How to get the acct_id of the 1,000,000th record from a table?

Reply
N/A
Posts: 0

How to get the acct_id of the 1,000,000th record from a table?

We get the data from ODIN (oracle database) using proc sql. It got 20M records and indexed by 'acct_id'. I need to pull all the records and I'm forced to not to query them all with a single query for some reasons (memory limitation so on) Smiley Happy

What's the best way to get all the data with, let's say, 20 queries. Ideally, I want to set up a macro program and call it 20 times. I thought if I know the acct_ids for the 1Mth, 2Mth,..., and 19Mth record, then I can condition it on them. Now, the problem is how do I even get those acct_ids using queries?

I was also trying to use 'rownum' and the following conditon does not work here:
//where rownum between 2 and 10//

Is there any standard solution for big queries?

Thanks.

-Nilan
SAS Super FREQ
Posts: 8,645

Re: How to get the acct_id of the 1,000,000th record from a table?

Hi:
You may want to consult with Tech Support. This is a big enough file that you need a data-specific and database-specific solution. And also, once you create your various BIG files, there may be efficiency considerations to take into account when you are doing subsequent processing or analysis with SAS.

To contact Tech Support, go to http://support.sas.com/ and in the left-hand navigation pane, click on the link entitled "Submit a Problem".

cynthia
N/A
Posts: 0

Re: How to get the acct_id of the 1,000,000th record from a table?

Hi Cynthia,

I'll do that.

Thanks for the direction.

-Nilan
Post a Question
Discussion Stats
  • 2 replies
  • 288 views
  • 0 likes
  • 2 in conversation