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.

 
Go Back  dBforums > Database Server Software > DB2 > how to print out message in db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-02-04, 23:36
novice2 novice2 is offline
Registered User
 
Join Date: Sep 2004
Posts: 1
how to print out message in db2

HI guys

I'm new for db2. Could you tell me how to print out message in db2 store procedure developed by sql. Just something like java system.out.println.

Another issue is I used command center today. But I can't edit the script in multiple lines. Just like

select *
from table1

when I run it , I got an error. I'm wondering if I need do things like that

select * \
from table1


Thank you in advance.
Reply With Quote
  #2 (permalink)  
Old 09-03-04, 02:34
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
http://www-106.ibm.com/developerwork...0302izuha.html

for your second question,

you do not need a continuation character in db2 .... Rather you need a termination character, which is defined in under 'Options' in Command Centre ... By default, the termination character is ;
select *
from table1 ;
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 09-03-04, 09:55
novice2 novice2 is offline
Registered User
 
Join Date: Sep 2004
Posts: 1
Thanks

Thanks for your answer
Reply With Quote
  #4 (permalink)  
Old 09-07-04, 00:23
jthakrar jthakrar is offline
Registered User
 
Join Date: Mar 2004
Posts: 46
In answer to your first question - how to print from a stored procedure, I believe that's not possible. Remeber that stored procedures/functions/routines are run on the backend/server - and the only form of input/output is parameters.

There is not way to "enable" serveroutput like in Oracle (or other RDBMSes).
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On