Re: dynamic sql with a cursor ?

From: Aaron Bertrand [MVP] (aaron_at_TRASHaspfaq.com)
Date: 03/19/04


Date: Thu, 18 Mar 2004 23:05:01 -0500

Maybe if you explain what you need to do in the loop, we can show you how to
do it without the cursor.

-- 
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Aruna Tennakoon" <kakopappa@hotmail.com> wrote in message
news:eZdYRTWDEHA.2308@tk2msftngp13.phx.gbl...
> Hi guys,
>                    I am am just wondering whether we can use a dynamic sql
> with a cursor to  loop thru all the recodes in the dynamic sql query ? any
> ides how to do this ?
>
>
> -Thanks
> -Aruna
>
>


Relevant Pages

  • Re: Help: Error Invalid Number at line 22
    ... CURSOR CUR_LOC IS ... 19 END LOOP; ... What bothers me is that this is an inappropriate use of a cursor ... Inappropriate use of native dynamic SQL ...
    (comp.databases.oracle.server)
  • Re: Help: Error Invalid Number at line 22
    ... CURSOR CUR_LOC IS ... 19 END LOOP; ... What bothers me is that this is an inappropriate use of a cursor ... Inappropriate use of native dynamic SQL ...
    (comp.databases.oracle.server)
  • Re: Cursor performance
    ... open Cursor for sql; ... Fetch Cursor into lvfield; ... end loop ... - Never use an explicit cursor for what you can just do in a SQL ...
    (comp.databases.oracle.server)
  • Cursor concept
    ... I tried to show a friend that pl/sql cursors are in fact pointers and ... case with a cursor. ... SQL> create table t as select rownum a from user_objects where rownum < ... 20 end loop; ...
    (comp.databases.oracle.misc)
  • Re: Opinions on approach, please...
    ... Code conversion is much more tricky. ... to update more than 32k records without a commit in-between. ... I advise you to do cursor definitions on working storage). ... I don't want to see ANY SQL code in them. ...
    (comp.lang.cobol)