-
For....Next loop
Is there a loop that I could use in TSQL that is equivalent to the
For...Next in VB? I need to be able to loop through a recordset in a stored
procedure and right now I am using a cursor. Thanks for the help.
Melanie
-
Re: For....Next loop
the example under DECLARE CURSOR (T-SQL) in BOL should help.
--
HTH,
David Satz
Principal Software Engineer
Hyperion Solutions
->Using SQL Server 7.0 SP3/6.5 SP5a/Cold Fusion 4.5.1 SP2/VSS
(Please reply to group only - emails answered rarely)
-----------------------------------------------------------------
"Melanie Norton" <mnorton@atcoflex.com> wrote in message
news:3aa93f74@news.devx.com...
> Is there a loop that I could use in TSQL that is equivalent to the
> For...Next in VB? I need to be able to loop through a recordset in a
stored
> procedure and right now I am using a cursor. Thanks for the help.
>
> Melanie
>
>
-
Re: For....Next loop
WHILE is the only looping construct in TSQL.
"DaveSatz" <davidsatz@yahoo.com> wrote in message
news:3aa948c2@news.devx.com...
> the example under DECLARE CURSOR (T-SQL) in BOL should help.
> --
> HTH,
> David Satz
> Principal Software Engineer
> Hyperion Solutions
> ->Using SQL Server 7.0 SP3/6.5 SP5a/Cold Fusion 4.5.1 SP2/VSS
> (Please reply to group only - emails answered rarely)
> -----------------------------------------------------------------
>
> "Melanie Norton" <mnorton@atcoflex.com> wrote in message
> news:3aa93f74@news.devx.com...
> > Is there a loop that I could use in TSQL that is equivalent to the
> > For...Next in VB? I need to be able to loop through a recordset in a
> stored
> > procedure and right now I am using a cursor. Thanks for the help.
> >
> > Melanie
> >
> >
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks