How to fetch packets of records and process them in Teradata
Teradata Teradata Discussion Forums Teradata.com Discussion Forum
Visit Teradata.com
Home       Guidelines    Member List
Welcome Guest ( Login | Register )
        


This online forum is for user-to-user discussions of Teradata products, and is not an official customer support channel for Teradata. If you require direct assistance, please contact Teradata support.


How to fetch packets of records and process... Expand / Collapse
Author
Message
Posted 7/26/2006 7:35:46 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 2/19/2007 7:38:00 PM
Posts: 4, Visits: 1
Hi,

I have a very urgent requirement.

There are some millions of records in one of my Teradata tables.Now I need to process these records by fetching 10000 records at a time.
For example- say in the first pass I pick up 10000 records and put them in a flat file,process it. Then in second pass pick next 10000 records put in a flat files process it and so on until all my records in the table gets processed.

Any solution to this problem would be really helpful.

Thanks,
Ashish.
Post #4734
Posted 8/12/2006 7:48:06 PM
Junior Member

Junior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior MemberJunior Member

Group: Forum Members
Last Login: 10/9/2007 3:07:00 PM
Posts: 13, Visits: 1
on UNIX I would use something like 'fastexport < your_fe_script | split'
or even better, just 'fastexport < your_fe_script | your_programm', provided your programm supports pipes.

otherwise you could do a

select your_row_num,*
from your_table
where your_row_num between 1 and 100000

select your_row_num,*
from your_table
where your_row_num between 100000 and 200000

and so on... but you need a numeric you_row_num column present in your table,
instead you could use 'qualify row_number() over (order by some_other_unique_field ) between 1 and 100001'
Post #4888
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.


All times are GMT -5:00, Time now is 2:48am

Powered By InstantForum.NET v4.1.4 © 2008
Execution: 0.078. 8 queries. Compression Disabled.