Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Query from two DB2 tables

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
srini_gunja
Currently Banned

New User


Joined: 24 Aug 2005
Posts: 7

PostPosted: Fri Apr 25, 2008 10:27 am    Post subject: Query from two DB2 tables
Reply with quote

Hi All,

Can anybody help me in querying two DB2 tables with join.

here is the query.


SELECT
SO31.CTID
,SO31.NFNCD1
,SO31.CAEFA
,SO31.DFNDT
,SO31.GRID
,SO31.AACVAO
,SO34.DSLOI2
,SO34.IDARC
FROM
CORP.TBSO31
,CORP.TBSO34
WHERE
SO31.CTID = '67739425'
AND SO31.NFNCD1 = SO34.NFNCD1
AND SO31.CAEFA = SO34.CAEFA
AND SO31.GRID = SO34.GRID


thanks, Srini
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10375
Location: italy

PostPosted: Fri Apr 25, 2008 10:31 am    Post subject: Reply to: Query from two DB2 tables
Reply with quote

what king of help do You need ...
did You try Your query under spufi ?
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Apr 25, 2008 5:52 pm    Post subject:
Reply with quote

Some explanation of your problem would help?


SELECT
SO31.CTID
,SO31.NFNCD1
,SO31.CAEFA
,SO31.DFNDT
,SO31.GRID
,SO31.AACVAO
,SO34.DSLOI2
,SO34.IDARC
FROM
CORP.TBSO31 SO31
,CORP.TBSO34 SO34
WHERE
SO31.CTID = '67739425'
AND SO31.NFNCD1 = SO34.NFNCD1
AND SO31.CAEFA = SO34.CAEFA
AND SO31.GRID = SO34.GRID
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Apr 25, 2008 9:00 pm    Post subject: Reply to: Query from two DB2 tables
Reply with quote

Kinda tough for them to reply when they have been banned. . .

Seemed like a rather severe penalty for not asking the question very well.

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm
No new posts Query on IEFBR14 with GDG Ashishpanpaliya JCL & VSAM 4 Tue Nov 07, 2017 8:34 pm
No new posts Selecting a row from multiple tables! Vignesh Sid DB2 2 Thu Oct 26, 2017 6:09 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us