Hi,
Iam new to datastage. Iam having a problem with db2/udb enterprise stage . I have sql statement like this for lookup
Select MANDT,EE,VARCOND,SWO......From.... WHERE ..... . I want to modify the Sql statement by adding distinct. When Iam Trying to add this distinct in output page .... general tab .....query type(Enter custom sql statement) Iam getting an error and I am not able to add distinct with option Generate Select Clause from Column list;enter other sql.
In query types which option I have to select to modify my query .
Thanks,
Somu
Problem in modifying sql statement in db2/udb stage
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If this is the DB2/UDB Enterprise stage then you're talking about a parallel job. Is it a parallel job? Techniques are different in parallel and server jobs; you have posted in the server forum, yet mentioned the DB2/UDB Enterprise stage.
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: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Custom SQL means that you write the SQL. It must have exactly the columns in its SELECT clause as you have columns in your Columns grid in the stage. Apart from that restriction it can be any SQL statement that is legal for the database and which returns rows containing those columns.
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.
Exactly.peterbaun wrote:In the derivation field in the DB2 plugin you will have to enter 'distinct ColName'
![Wink :wink:](./images/smilies/icon_wink.gif)
Specifically, insert the keyword 'distinct' before the derivation of the first column. Don't use custom sql for something simple like that.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers