Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2004
    Location
    Oklahoma City OK -
    Posts
    122

    Unanswered: need to use dynamic sql and a cursor

    Is it possible to build dynamic sql, a select statement, and then using that dynamic sql declare a cursor and then use the cursor in a loop to write the data to a text file?

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    Yes, you can use a cursor variable if your queries always return the same column list, or the DBMS_SQL package if not.

  3. #3
    Join Date
    Jul 2003
    Posts
    2,296
    I have used ref-cursors to accomplish this, but I am sure there is a better
    way (as above) to accomplish the problem.
    - The_Duck
    you can lead someone to something but they will never learn anything ...

Posting Permissions

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