galera seguinte, baixei esse site
ai to tentando roda a query Transferir_memb___id_para_webCash.txt e a Transferir_memb___id_para_webVips.txt, nao esta dando certo, abaixo as query .
declare @memb___id varchar(10);
declare c cursor for select memb___id FROM MEMB_INFO
open c
FETCH NEXT FROM c INTO @memb___id
WHILE @@FETCH_STATUS = 0
BEGIN
IF NOT EXISTS (SELECT 1 FROM webSite.dbo.webCash WHERE username=@memb___id)
INSERT INTO webSite.dbo.webCash (username, amount) VALUES (@memb___id, 0)
FETCH NEXT FROM c INTO @memb___id
END
CLOSE c
DEALLOCATE c
e
declare @memb___id varchar(10);
declare c cursor for select memb___id FROM MEMB_INFO
open c
FETCH NEXT FROM c INTO @memb___id
WHILE @@FETCH_STATUS = 0
BEGIN
IF NOT EXISTS (SELECT 1 FROM webSite.dbo.webVips WHERE username=@memb___id)
INSERT INTO webSite.dbo.webVips (username, type, dateBegin, dateEnd) VALUES (@memb___id, 0, '0','0')
FETCH NEXT FROM c INTO @memb___id
END
CLOSE c
DEALLOCATE c
ai to tentando roda a query Transferir_memb___id_para_webCash.txt e a Transferir_memb___id_para_webVips.txt, nao esta dando certo, abaixo as query .
declare @memb___id varchar(10);
declare c cursor for select memb___id FROM MEMB_INFO
open c
FETCH NEXT FROM c INTO @memb___id
WHILE @@FETCH_STATUS = 0
BEGIN
IF NOT EXISTS (SELECT 1 FROM webSite.dbo.webCash WHERE username=@memb___id)
INSERT INTO webSite.dbo.webCash (username, amount) VALUES (@memb___id, 0)
FETCH NEXT FROM c INTO @memb___id
END
CLOSE c
DEALLOCATE c
e
declare @memb___id varchar(10);
declare c cursor for select memb___id FROM MEMB_INFO
open c
FETCH NEXT FROM c INTO @memb___id
WHILE @@FETCH_STATUS = 0
BEGIN
IF NOT EXISTS (SELECT 1 FROM webSite.dbo.webVips WHERE username=@memb___id)
INSERT INTO webSite.dbo.webVips (username, type, dateBegin, dateEnd) VALUES (@memb___id, 0, '0','0')
FETCH NEXT FROM c INTO @memb___id
END
CLOSE c
DEALLOCATE c