Re: Retrieving Huge Data From DB in steps of 1000
From: Eric.Li (anonymous_at_microsoftnews.org)
Date: 06/02/04
- Previous message: Niraj Ranka: "Web Data Mining"
- In reply to: SSP: "Retrieving Huge Data From DB in steps of 1000"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 02 Jun 2004 14:19:54 -0500
Well depends on if you have unique key or not
Let's say you don't
then create a temp. table with identity column with seed (1, 1) or (0,
1), then select everything from your main table into this temp. table
if you want to process only 1000 records, then open a cursor on the
first 1000 records, process them, delete them from the temp. table,
repeat this process till you are done.
-- Eric Li SQL DBA MCDBA SSP wrote: > Hello, > I am working on a application that involves processing > 60,000+ rows of records from one table alone. This table's > child tables have probalby double the number of records > than that are present in the parent.My question is how can > I retreive records in say steps of 1000 process them , > then go to the next 100o records in the same table, > process them and so on. > Ideally I would prefer it done on the SQL Level, through > Stored Procedures, Cursors,etc. But I am not sure how to > do it. So would someone plz help me with a example on how > to do this or a much a better aprroach if present would > be very highly appreciated. > Thanx, > SSP. > . > >
- Previous message: Niraj Ranka: "Web Data Mining"
- In reply to: SSP: "Retrieving Huge Data From DB in steps of 1000"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|