Compound statements, how do I send data to the console from them ? -
08-19-2003
, 01:45 AM
Hi all,
As part of setting up a database we have, I am writing some scripts to load
core data. Because I need to generate values throughout these scripts and
reuse them, I have embedded the SQL with a compound SQL statement. I.e.
BEGIN ATOMIC
...sql statements ...
END
The problem I have is that if I perform any statement within this block that
would normally produce output on the console, nothing happens. For example,
VALUES (1,2), (3,4), (5,6);
Would normally produce:
1 2
----------- -----------
1 2
3 4
5 6
3 record(s) selected.
But if I wrap a begin block around it, nothing appears on the console. How
can I get output I wish to see to appear ? Also, I can't find any statement
or function for outputting an assembled line of text. For example
'Records:" || reccount, any ideas how to do this with DB2 ??
cio
Derek. |