IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

BIND PLAN with two table with two different qualifiire??????


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vijayakumar.yellala

New User


Joined: 19 Apr 2006
Posts: 63
Location: Chennai

PostPosted: Fri Aug 20, 2010 4:21 pm
Reply with quote

Hi,

I need to BIND PLAN with two table with two different qualifires.

Qualifier table name
DEV1DBUS ESHEMP_DATAT
MNS_SLS RDR_HS


Regards,
Vijay
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Fri Aug 20, 2010 4:33 pm
Reply with quote

I hope you mean bind package.

no can do
you'll have to qualify at least one of them in your program, preferably the one that doesn't have the environment in it.
Back to top
View user's profile Send private message
vijayakumar.yellala

New User


Joined: 19 Apr 2006
Posts: 63
Location: Chennai

PostPosted: Tue Aug 24, 2010 4:00 pm
Reply with quote

no...

In the same program we have to use two tables, but the two table have two different qulifires.

So, Plz help me how to precompile the program with two qualifires.

Regads
Vjay
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 24, 2010 5:22 pm
Reply with quote

unless you are JOINing these two tables,
suggest you have a sub-module for each.
Then you have created a solution for anyone else
that encounters this absurd situation.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Aug 24, 2010 6:54 pm
Reply with quote

dbzTHEdinosauer wrote:
unless you are JOINing these two tables,
suggest you have a sub-module for each.
Then you have created a solution for anyone else
that encounters this absurd situation.

absurd? We simply always qualify all tables in our programs, even when using one schema
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 24, 2010 7:08 pm
Reply with quote

GuyC,
qualifying tables is your experience.
In the 20 or so sites that I have worked,
I have never qualified the table in imbedded SQL.

always used the Bind parms to qualify the tables,
but, that did mean tables from differing schema required separate modules.
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Aug 24, 2010 8:10 pm
Reply with quote

Hi,

We don't qualify tables too..

Aliases can be created to resolve this like,
Code:
Database   qualifier   table
shandb      shandb      demployee
bobt1      bobt1      employee

Created the below alias,

CREATE ALIAS BOBT1.EMPSHAN     
       FOR SHANDB.DEMPLOYEE;   


select * from bobt1.employee
where empno not in (select empno in bobt1.empshan);


Please let me know if my thinking is wrong....

Thanks,
Sushanth
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Aug 24, 2010 8:53 pm
Reply with quote

Qualifying or not qualifying:it depends on your architecture, in both cases you have to live with the consequences. but neither is absurd.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Unload and Load ISPF Table TSO/ISPF 4
No new posts ISPF Table to add a new column TSO/ISPF 1
No new posts Inserting into table while open selec... DB2 1
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top