How to fetch particular record?

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
skumar
Participant
Posts: 88
Joined: Thu May 25, 2006 5:11 am
Location: Hyderabad

How to fetch particular record?

Post by skumar »

Hi all,

I have 1 million rows in my target and i am using these records in a lookup table .now the problem for me is i am joining this look up table with some other table and i want one particular row from that lookup how to get the 1000th record directly from that lookup table instead of processing all the records

THANKS IN ADVANCE.

KUMAR.
thumsup9
Charter Member
Charter Member
Posts: 168
Joined: Fri Feb 18, 2005 11:29 am

Post by thumsup9 »

I am not sure if this what you want, but you can wrtie that particular 1000th record to your lookup file and the use it in your lookup with other table. This way you dont have to looup all the records.

HTH
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What is your database? I know in SQLServer you can use something like

Code: Select all

Select TOP 1 FROM (select TOP 1000 from TABLE
ORDER BY KEY DESC)
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply