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 > Default qualifier in a stored procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-31-06, 23:41
DBA-Jr DBA-Jr is offline
Registered User
 
Join Date: Mar 2005
Posts: 108
Default qualifier in a stored procedure

Hi All,
I am using DB2 v8.1 on linux. I created a SQL stroed procedure SP1 under schema1 which accesses an unqualifed Table1. Now under schema2, I call SP1:

call schema1.SP1;

What would be the qualifier of Table1? It seems to be schema1. But what I really need is to output the qualifier and the table name (in a format of "qualifier.Table1") into a script so I can use the script outside of the SP. Hard coding it as "schema1" is not my choice. And I know special register "current schema" would be become schema2 at run time. Could you please advise and give me a reference (DB2 manuals) if possible?

Thanks and appreciate your advice.

Last edited by DBA-Jr; 07-31-06 at 23:59.
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