foreach loop in sql server

X

xs

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

Cor Ligthert

Hi XS,

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

I hope this helps/

Cor
 
J

Jon Skeet [C# MVP]

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.
 
C

Cowboy \(Gregory A. Beamer\) [MVP]

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!
************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top