executing sql

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
kishoreramachandran
Participant
Posts: 88
Joined: Tue Nov 28, 2006 9:33 pm

executing sql

Post by kishoreramachandran »

2 new fields are added to oracle table.to populate this I need to execute a sql which willbe using 2 tables and if itsatisfies the criteria of the sqli i need to populate the field with yes. for the 2nd field i have a different sql which i need to execute and then populate that with yes.
can you please let me know how to do this
In the query caluse should i give the names of all the tables involved in the query.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You have not told us which database you are using, but the obvious mechanism seems to be an UPDATE statement containing two nested SELECT statements each of which includes a CASE construct to make the Yes/No decision.

In DataStage, of course, you could perform lookups to make the decision.

But you seen to have the notion of using SQL fixed in your mind for some reason.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kishoreramachandran
Participant
Posts: 88
Joined: Tue Nov 28, 2006 9:33 pm

Post by kishoreramachandran »

itis oracle database.
Post Reply