Hi
I have table with
processId CustId
1 z101
2 z101
3 z102
4 z103
1 z103
I want for each custId ---- corresponding ProcessIds should be taken.
Ex: for z101----- ProcessIds are 1,2
I have further codings with that each processId values.
this something like a nested for loop in C Coding
For(..)
{
for(..)
{ ----}
}
how to implement this in either dB2 query or in datstage..
Plz help me to resolve this.
Any help is appreciated..
thanks in advance..
how to fetch one custid associated with multiple processids.
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
select CustID, Count(*) from table group by CustID having Count(*) > 1;
Code: Select all
----> Copy -----------------> Join -----> Filter ----->
| ^
| |
+----> Aggregator ----+
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom