Hi
Can we impliment this query in data stage
select count(*) ,col1,col2,col3,min(col4) from #table1 (which is output data from transformer) group by col1,col2,col3 where count(*) > 1
Thanks in advance for help
ARif
aggregator stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
No, but only because it's illegal SQL (not a DataStage issue). You need HAVING instead of WHERE.
That said, your metadata (table definition) requires one Integer column whose derivation is COUNT(*) and four other columns to match the other columns in your query.
Note that, in some databases, Count(ColX) is more efficient than Count(*) depending on the type of index used on ColX.
That said, your metadata (table definition) requires one Integer column whose derivation is COUNT(*) and four other columns to match the other columns in your query.
Note that, in some databases, Count(ColX) is more efficient than Count(*) depending on the type of index used on ColX.
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.
Yes you can. Sort the data using sort stage. Have KeyValueChange option enabled. Filter out (select only) those whose Key has not changed atleast for once. And do aggregation.
Or simply aggregat and filter based on the additional column.
Or simply aggregat and filter based on the additional column.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Charter Member
- Posts: 87
- Joined: Sat Mar 18, 2006 11:45 pm
Yeah you are right ,I am sorry I made mistake while typing.ray.wurlod wrote:No, but only because it's illegal SQL (not a DataStage issue). You need HAVING instead of WHERE.
That said, your metadata (table definition) requires one Integer column whose derivation is COUNT(*) and four other columns to match the other columns in your query.
.
Thanks