Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 10256
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 Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts To know activities on db2 tables ashek15 DB2 4 Fri Mar 03, 2017 11:23 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us