foreach loop in sql server

  • Thread starter Thread starter xs
  • Start date Start date
X

xs

May I know if there is a foreach loop equivalent found in Sql Server? I
would like to use 1 in sprocs.
 
Hi XS,

I think that you can have a look on msdn for SqlDatareader

I hope this helps/

Cor
 
xs said:
May I know if there is a foreach loop equivalent found in Sql Server? I
would like to use 1 in sprocs.

I would suggest asking in a SqlServer group - perhaps
microsoft.public.sqlserver.programming would be good.
 
I agree with posting in a SQL group, preferably
microsoft.public.sqlserver.programming

You will want to look at cursors. Not exactly what you are looking for, as
objects are treated differently in SQL Server than code, but you can loop
through a cursor and check data items for matches.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

************************************************
Think Outside the Box!
************************************************
 
Back
Top