Say, I have the following query to execute to read bulk set of records:
SELECT c1, c2, c3 , ........, c10
FROM TBL1
WHERE C5 = 5
ORDER BY c7, c8
Then, I have:
EXEC SQL WHENEVER SQLERROR DO ...;
EXEC SQL DECLARE xx CURSOR FOR xxx;
EXEC SQL OPEN xxx;
EXEC SQL WHENEVER NOT FOUND goto notfound;
EXEC SQL FETCH xxx INTO :a1:a1_ind;
where a1
is array of structures and a1_ind
is array of indicator variables.
Can I use variable number of bind variables? For example:
EXEC SQL FETCH xxx INTO :v1:v1_ind, :v2:v2_ind, .... :v6:v6_ind;
Can I use EXEC SQL DESCRIBE BIND VARIABLES
? How?
Please guide.