纺 http://appza.seed2you.com Ǩ
Would you like to react to this message? Create an account in a few clicks or log in to continue.

纺 http://appza.seed2you.com Ǩ

纺 http://appza.seed2you.com Ǩ
 
บ้านPortalliค้นหาLatest imagesสมัครสมาชิก(Register)เข้าสู่ระบบ(Log in)

 

 źIDҹ SQL

Go down 
ผู้ตั้งข้อความ
GM_appza
GM_Appza

GM_Appza
GM_appza


จำนวนข้อความ : 59
: 40
Localisation : ͧ͡
Registration date : 02/06/2007

źIDҹ SQL Empty
ตั้งหัวข้อเรื่อง: źIDҹ SQL   źIDҹ SQL Icon_minitimeThu Jun 07, 2007 7:36 am

DECLARE @Acc varchar(10), @Chars varchar(10)

DECLARE LISTA CURSOR LOCAL FOR
SELECT memb___id FROM MEMB_INFO
OPEN LISTA
FETCH NEXT FROM LISTA INTO @Acc
WHILE @@FETCH_STATUS = 0
BEGIN
DECLARE CHECKLISTA CURSOR LOCAL FOR
SELECT TOP 1 Name FROM Character WHERE (AccountID=@Acc)
OPEN CHECKLISTA
FETCH NEXT FROM CHECKLISTA INTO @Chars
IF @@ROWCOUNT = 0
begin
DELETE from MEMB_INFO where memb___id=@Acc
end
CLOSE CHECKLISTA
DEALLOCATE CHECKLISTA

FETCH NEXT FROM LISTA INTO @Acc
END
CLOSE LISTA
DEALLOCATE LISTA

and please, if u want to test it BEFORE delete, change line:

Quote:
DELETE from MEMB_INFO where memb___id=@Acc
ขึ้นไปข้างบน Go down
http://appzamu.gogoo.us
 
źIDҹ SQL
ขึ้นไปข้างบน 
หน้า 1 จาก 1

Permissions in this forum:คุณไม่สามารถพิมพ์ตอบ
纺 http://appza.seed2you.com Ǩ :: Guides-
ไปที่: