Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Problem with a while loop

Author  Topic 

Cyclonik
Posting Yak Master

114 Posts

Posted - 2001-01-22 : 16:19:37
I am having some trouble with a While Exists loop.. the loop runs indefinately. Is there something syntactically wrong with the loop?

While Exists(Select lanid from tblTest where lanid = @lanid)
BEGIN
Select @add = @add + 1
Select @lanid = LOWER(SUBSTRING(@fname,1,1)) + CONVERT
(varchar1),@add) + LOWER(SUBSTRING(@lname,1,6))
END

Thanx
Christian

-=:SpasmatiK:=-
   

- Advertisement -