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

using group by and fetching multiple records


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

New User


Joined: 01 Mar 2005
Posts: 20

PostPosted: Fri Oct 03, 2008 6:36 am
Reply with quote

I have one requirement..
For the RI_NUM variable taking from file, I need to select the count of incidents from 1100 table for each of the 4 groups where the DEL-TS is null. Use the 1700 table to tell which incdt_type_cd values belong to the groups.
1700 has following columns
Incdt_type_cd
Incdt_grp_cd

4groups are A1, A2, A3, A4.

can some one help me with the sql query that satisfies this requirement.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Oct 03, 2008 6:47 am
Reply with quote

Hello,

You need to present more complete info.

If you post the needed column definitions from the tables, some sample data from the 2 tables, and the "output" you want, someone will be better able to offer suggestions. This does not need to be a lot of data, just enough to adequately show what you need.

Keep in mind that the most inportant part of getting help from the forum is doing a thorough job of explaining the requirement.
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
Search our Forums:

Back to Top