L
lavu
I am using SQL ODBC's ExecDirect() call to execute a SQL statement.
There SQL
statements are SELECT that have bound cols and I process the output
based on return
values.
(a) Sometimes there is pre processing and I can piggy back another
statement like
DECLARE LOCAL TEMPORARY TABLE temp_table ...............
INSERT INTO temp_table ..............SELECT ddtl.dsvc_seq,
with the
ACTUAL SELECT statement here after the temp_table has values.
This goes through fine with a single EXECDirect call.
(b) However I cannot send in two select statements at the same time,
possibly because
of binding. Although my first SELECT is a SELECT ....INTO which
implies that it does
not return anything.
I have two questions:
1. why does the first combination (a) work and the seoncd (b) does not
?
2. Is there any way to get the second one (b) to work ?
Any thoughts will be greatly appreciated.
There SQL
statements are SELECT that have bound cols and I process the output
based on return
values.
(a) Sometimes there is pre processing and I can piggy back another
statement like
DECLARE LOCAL TEMPORARY TABLE temp_table ...............
INSERT INTO temp_table ..............SELECT ddtl.dsvc_seq,
with the
ACTUAL SELECT statement here after the temp_table has values.
This goes through fine with a single EXECDirect call.
(b) However I cannot send in two select statements at the same time,
possibly because
of binding. Although my first SELECT is a SELECT ....INTO which
implies that it does
not return anything.
I have two questions:
1. why does the first combination (a) work and the seoncd (b) does not
?
2. Is there any way to get the second one (b) to work ?
Any thoughts will be greatly appreciated.