Extracting Distinct Columns without SQL query

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
ravij
Premium Member
Premium Member
Posts: 170
Joined: Mon Oct 10, 2005 7:04 am
Location: India

Extracting Distinct Columns without SQL query

Post by ravij »

Hi,

If my table contains 50 columns and I have to extract 30 distinct columns if I used hash file what can be happen to the remaining rows

Is there any option other than writing the sql query and the sinario is if if we want to select distinct on 25 columns what can we do

any help would be apprecieated.
thanks in advance.
Ravi
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Re: Extracting Distinct Columns without SQL query

Post by balajisr »

ravij wrote:Hi,

If my table contains 50 columns and I have to extract 30 distinct columns if I used hash file what can be happen to the remaining rows

any help would be apprecieated.
thanks in advance.
When you write to the hash file duplicate key values will be overwritten.

Why do you do not want to write a sql query expecially when you are retreiving value from a table?
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Re: Extracting Distinct Columns without SQL query

Post by gateleys »

ravij wrote:I have to extract 30 distinct columns if I used hash file what can be happen to the remaining rows

Is there any option other than writing the sql query and the sinario is if if we want to select distinct on 25 columns what can we do

any help would be apprecieated.
thanks in advance.
Why are you concerned about what happens to the duplicate rows since your design doesn't seem to want them!! Yes, hashed file will eliminate any duplicate rows. Performing a DISTINCT in the database stage does the same, but with the advantage that unnecessary records are filtered in the source itself, thereby reducing data traffic within the job.

gateleys
Post Reply