DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Use CURSOR results in a Select?

  1. #1
    Join Date
    Nov 2001
    Location
    DE
    Posts
    1
    Is this possible?

    Select several records into a cursor.

    Use the values in the cursor to delete from tables.

    I do not want to loop through each cursor value and issue a seperate delete command...

    almost something like (psuedo code below)



    DELETE FROM table WHERE update_date = c_delete dates;

  2. #2
    Join Date
    Jul 2000
    Posts
    521
    Why cannt you use a subquery ?

    DELETE FROM table WHERE date_column in (your_cursor_definition_that_selects_only_the_required_dates);

    Or, you may even be able to use 'EXISTS'.
    svk

Posting Permissions

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


Click Here to Expand Forum to Full Width