Variable for a cursor declaration

"jain cj" <[email protected]> Wed, 27 Aug 2003 13:05:14 +0000
Newsgroups gmane.comp.db.sapdb.general
Message-ID <[email protected]>
Hi,

  Here I am facing a problem in $curosr declaration....i will explain it 
below

Code which working without error
--------------------------
$CURSOR = 'test';
DECLARE :$CURSOR CURSOR FOR
SELECT * FROM SAPADMIN.SI_USERS;

when I stored the sql (Query) into a variable ( I want to make the query as 
dynamic) and using that string it gives me error

var str VARCHAR(2000);
str = 'SELECT * FROM SAPADMIN.SI_USERS';

$CURSOR = 'test';
DECLARE :$CURSOR CURSOR FOR (I want to use the String variable(str)  here)

Please help

By Jain

_________________________________________________________________
Narain Karthikeyan. He's fast, really fast. 
http://server1.msn.co.in/sp03/tataracing/index.asp Want to meet him?