If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
Getting resultsets back from a DB2 sql atomic block
undefinedHello
I'm trying to find out a way in which messages like "hi" or "hello" can be returned to the command center/user.
I also would like to know how to return any result sets from atomic block compound statement. Right now i can execute an atomic block like the following in Command Center.
begin atomic
insert into mytable values(10);
select count(*) from mytable;
end
But I dont get back any resultset. All I get in the output area in the command center is
begin atomic
insert into mytable values(10);
select count(*) from mytable;
end
DB20000I The SQL command completed successfully.
------------------------------------------------------------------------------------------------
When I run the same select statement individually i get
This is very urgent. Could somebody please help me out with this? Is there any way in which these resultsets can be passed back ..like dbms_output in oracle or soemthing like that. I've seen a UDF online which replicates dbms_output (PUT_LINE) but it is not suitable for the application I'm working on. Are they any other solutions to this problem of mine?
Thank you very much
Vijay
I want to have an anonymous block so that I could use logic inside it. When I have two statements one after the other, I cannot use if then - end if and loops and things like that, right? or am i wrong?