Skip to content

Select and insert

Maneesh A N

Asked Nov 30, 2013, 11:42 PM EST1 answer
Share
LinkedInX
how to give for loop in sql 2005

i need to include two expressions in select query ,but i got error...and result of  select query should store into a variale...give example please...

after 12 variables are there to keep store select output..and before insert i want to use for loop...give example

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • Ankur
    0
    Dear Maneesh,

    Sorry but your query is not clear, could you please elaborate why do you need for loop.
    Are you modifying values from SELECT and before INSERT?

    have you gone through "Cursors" that are designed for this type of purpose.

    Thanks...
    0