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 2005 Forums
 Transact-SQL (2005)
 how do you exit a loop ?

Author  Topic 

mary_itohan
Posting Yak Master

191 Posts

Posted - 2008-09-16 : 09:58:41
Hello,
how do u exit a loop ?

here is my code ?

thanks


while ( @min <= @max)
begin
set @password = charindex(left(@each_person,(len(@defaultcountry)+len(@min))),@s)
set @min = @min + 1
end


How do i exit, when the condition @password is met, ie its not 0




_____________________


Yes O !

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-16 : 10:02:31
use BREAK

http://doc.ddart.net/mssql/sql70/ba-bz_8.htm
Go to Top of Page

mary_itohan
Posting Yak Master

191 Posts

Posted - 2008-09-16 : 10:07:43
tnx

_____________________


Yes O !
Go to Top of Page
   

- Advertisement -