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
 

 

using group by and fetching multiple records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: using group by and fetching multiple records
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

Site Director


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

PostPosted: Fri Oct 03, 2008 6:47 am    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am


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