Reply to Re: How copy table data from one database to another

Your name:

Reply:


Posted by angsql on 11/24/05 11:23

Hi Erland,

I tried this code on my test box for deleting the data, I had a very
strange problem

here is my code

set nocount off
delete from loop_projectid

while 1=1
Begin
insert into loop_projectid
select top 500 project_id, project_name from pds_project P
where not exists ( select * from loop_projectid L where
P.Project_id=L.Project_id )
--print @@rowcount
if @@rowcount < 500
begin
break
End
end

select * from loop_projectid
********************************************************

I get 1244 rows when i do a select, BUT if I put a print @@rowcount in
front of IF, I get 500 rows. Could you please help me.

..AS

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация