Page 1 of 1

Extracting Distinct Columns without SQL query

Posted: Wed Mar 29, 2006 3:47 am
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.

Re: Extracting Distinct Columns without SQL query

Posted: Wed Mar 29, 2006 4:08 am
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?

Re: Extracting Distinct Columns without SQL query

Posted: Wed Mar 29, 2006 7:31 am
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