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

Count of customer id from two tables


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

Active User


Joined: 01 Feb 2007
Posts: 123
Location: Hyderabad

PostPosted: Tue Oct 30, 2007 11:53 am
Reply with quote

Hi,

I want the total count of customer id from two table.
ie. If in my first table i had 5 customer id of 10000 and 3 customer id of 10000 in my second table. then the total count should be 8.
How can i get this.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Oct 30, 2007 7:28 pm
Reply with quote

Hello,

You might use:
Select count(*) from tab1 where custid = 10000
Select count(*) from tab2 where custid = 10000
Add the counts giving total for custid 10000
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts count contained values of several col... DB2 5
No new posts DB2 Query to get the count of Unique ... DB2 2
No new posts Question regarding ISPF tables with T... TSO/ISPF 11
No new posts To join 2 tables and to join 3rd tabl... DB2 8
No new posts CA7 count with DATE variable CA Products 0
Search our Forums:


Back to Top