Dear Members,
I have a requirement as below:
Select first row
From TEXT
Where TEXT.OID = 2498
And TEXT.TEXT in ('Discharge', 'Expired')
Group by TEXT.OID
Order by TEXT.STARTDTIME Asc
The source TEXT is Flat file.There are mutiple STARTDTIME for same OID and we have to pick up the least one .
We designed as below:
SEQFile Stage---->RDC-----Xfrm-----Target dataset
In RDC,we used OID as key and Partitioning tab
did HashPartitioning on OID and Sort on STARTDTIME.Not used Sort on OID.
We received proper output.Wanted to check with you if this approach is fine or we need to sort OID also along with Partitioning.
Thanks,
Rumu
Group by clause implementation in Datastage
Moderators: chulett, rschirm, roy
Group by clause implementation in Datastage
Rumu
IT Consultant
IT Consultant
So... RDC is the "Remove Duplicates" stage, yes?
Yes, one would need to sort on all of the "group by" fields, in this case OID. I would wager if you did more extensive testing on larger data sets you would no longer receive 'proper output'.
Yes, one would need to sort on all of the "group by" fields, in this case OID. I would wager if you did more extensive testing on larger data sets you would no longer receive 'proper output'.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers