Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Posts
    47

    Question Unanswered: Dynaimic SQL in While Loop

    Hi,
    See if u could help me with the following..
    I want to do the following...
    I want to read a group of records for a particular ID and then insert those records in some other Table. For that I m Trying to use While statement...

    While Exists('select * from '+@tableName+' where ID = '+@ID)
    My Insert Query
    End
    It gives me error in the while statement...

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Oh blimey - are you still trying to do this?

    What is "My Insert Query"? We might be able to avoid the loop at least.
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •