• HyperFilter | DoS Protection | DDoS Protection | DoS Mitigation | DDoS Mitigation | AntiDoS | AntiDDoS | Proxy Shielding

Kimde Ne İtem var kontrol (item kimler de var)

bigahega

Administrator
Yönetici
KoCuce.Com
Katılım
7 Mart 2012
Mesajlar
12,842
sql.jpg



Kod:
set ANSI_NULLS ON

set QUOTED_IDENTIFIER ON

GO

 

Create procedure [dbo].[kimdevar]

@num int,

@mode int

as

if @mode in (1,2)

begin

if @mode = 1 begin if exists (select * from sysobjects where id = object_id(N'found') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table found CREATE TABLE found([StrUserID] [varchar](21) NULL) end

if @mode = 2 begin if exists (select * from sysobjects where id = object_id(N'found') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table found CREATE TABLE found([strAccountID] [varchar](21) NULL) end

declare @item varbinary(4), @i int

set @item = substring(cast(@num as varbinary(4)),4,1)+substring(cast(@num as varbinary(4)),3,1)+substring(cast(@num as varbinary(4)),2,1)+substring(cast(@num as varbinary(4)),1,1)

set @i = 1

if @mode = 1 -- Charlarda Aramak İçin

begin

while @i < 401

begin

insert found select struserid from userdata where substring(stritem, @i,4) = @item

set @i = @i + 8

end end else

if @mode = 2 -- Bankalarda Aramak İçin

begin

while @i < 1601

begin

insert found select straccountid from warehouse where substring(warehousedata, @i,4) = @item

set @i = @i + 8

end end

select * from found

drop table found

end



ARAMA KODLARI





View hidden content is available for registered users!
 
Geri
Üst