View previous topic :: View next topic
|
Author |
Message |
balubhat
New User
Joined: 04 Oct 2005 Posts: 19 Location: Singapore
|
|
|
|
Hi All
I have a stand alone COBOL-DB2 program and I have many embedded SQL in the program. Due to some requirement I have to embed a new SQL for which the qualifier of the table is different than all other tables used in the program. i.e. all my existing SQLs refer to the table with qualifier as A001.<TABLE_NAME>. But now with my new SQL , I have to refer to a table with qualifier A002.
In the program we don't mention the qualifier but in the PACKAGE we give the qualifier.
Now my question is how can I compile and BIND this program for two different qualifier?
Pls help me.
Thanks. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
suggest you create a new module. |
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
Try specifying the non-default qualifier explicitly when you reference the table - for example
Code: |
SELECT *
FROM A002.<table_name> |
|
|
Back to top |
|
|
wanderer
Active User
Joined: 05 Feb 2007 Posts: 199 Location: Sri Lanka
|
|
|
|
Or create a view with select * under schema A001. on the base table A002 and use the view instead. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
deleted by dbz |
|
Back to top |
|
|
rahulcherekar
New User
Joined: 20 Feb 2007 Posts: 16 Location: New York
|
|
|
|
Creating synonym should solve your problem. If you do not have authority check with your DBAs.
Thanks,
Rahul. |
|
Back to top |
|
|
Anand Kumar
New User
Joined: 29 Aug 2007 Posts: 24 Location: chennai
|
|
|
|
We had a couple of issues, similar to yours. We solved in creating a synonym. We should make sure the proper privilege is given to the user Read/Write/update |
|
Back to top |
|
|
sachin_star3 Warnings : 1 New User
Joined: 30 Sep 2006 Posts: 78 Location: pune
|
|
|
|
you can deal with your issue using following 2 ways.
1.create 2 different package with seperate hlq and bind in the single plan.
2.hard either any one table in hlq and put the other table hlq in the package bind |
|
Back to top |
|
|
|