How to declare a cursor where the name of the file to be user will be known at the run time?
DECLARE userlist CURSOR for SELECT * from XXX JOIN tab1 ON XXX.a = tab1.a;
XXX need to be variable.
DECLARE userlist CURSOR for SELECT * from XXX JOIN tab1 ON XXX.a = tab1.a;
XXX need to be variable.