Hello
Was wondering if you guys could show me how to do a simple loop, Im trying
to execute a sp and pass the parameter CustomerID as parameter from the
select im looping through
/LasseLook for cursors in the BOL, you can also use a template from the QA, choose
Edit --> Add Template --> Using Cursor (then one of the templates)
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Lasse Edsvik" <lasse@.nospam.com> schrieb im Newsbeitrag
news:%234%23YbMQYFHA.1240@.TK2MSFTNGP14.phx.gbl...
> Hello
> Was wondering if you guys could show me how to do a simple loop, Im trying
> to execute a sp and pass the parameter CustomerID as parameter from the
> select im looping through
> /Lasse
>|||Instead of thinking about loops, look for a set-based solution first.
Loops aren't generally the best way to accomplish data manipulation
tasks.
The only loop construct in TSQL is the WHILE BEGIN ... END loop.
David Portas
SQL Server MVP
--|||http://www.extremeexperts.com/SQL/A...TSQLResult.aspx
HTH,
Vinod Kumar
MCSE, DBA, MCAD, MCSD
http://www.extremeexperts.com
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
"Lasse Edsvik" <lasse@.nospam.com> wrote in message
news:%234%23YbMQYFHA.1240@.TK2MSFTNGP14.phx.gbl...
> Hello
> Was wondering if you guys could show me how to do a simple loop, Im trying
> to execute a sp and pass the parameter CustomerID as parameter from the
> select im looping through
> /Lasse
>
No comments:
Post a Comment