Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8788773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:13:12+00:00 2026-06-13T22:13:12+00:00

There is a temp table TMP_OA_PSTN_CMP_11035 with fields: ACTION_OBJID NUMBER, CONTRACT_OBJID NUMBER, STATUS varchar2(40),

  • 0

There is a temp table TMP_OA_PSTN_CMP_11035 with fields:

ACTION_OBJID NUMBER,
CONTRACT_OBJID NUMBER,
STATUS varchar2(40),
UPDATE_DATE DATE

This contains 7 million data.i want to create seven different temp tables with data from TMP_OA_PSTN_CMP_11035 sorted by action_objid and each containing 1 million records. The column ACTION_OBJID is not a sequence .

I tried using rownum but that inputs random data.

For EG:

Temp1 : data containing action_objid from 5 ,8…to 1100000(as action_objid is not a sequence,this much is 1 million data).
Similarly, for other 6 temp tables.
I am using oracle 10g.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:13:14+00:00Added an answer on June 13, 2026 at 10:13 pm

    How about

    CREATE TABLE TEMP_TABLE_1
      SELECT *
        FROM (SELECT *
                FROM TMP_OA_PSTN_CMP_11035
                WHERE ACTION_OBJID > 0
                ORDER BY ACTION_OBJID)
        WHERE ROWNUM <= 1000000
    

    Then repeat the above for each of your other temp tables, replacing WHERE ACTION_OBJID > 0 with (SELECT MAX(ACTION_OBJID) FROM name of previous temp table). So for TEMP_TABLE_2 the statement would be

    CREATE TABLE TEMP_TABLE_2
      SELECT *
        FROM (SELECT *
                FROM TMP_OA_PSTN_CMP_11035
                WHERE ACTION_OBJID > (SELECT MAX(ACTION_OBJID) FROM TEMP_TABLE_1)
                ORDER BY ACTION_OBJID)
        WHERE ROWNUM <= 1000000
    

    Share and enjoy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In SQL Server, there's no way to create a temp table on the fly
I have the string temp[256] and inside it there's a double number, such as
There is a column that exists in 2 tables. In table 1, this column
Is there a way to select the row from a temp table (table has
I am creating a temp table with a query like this: CREATE TEMPORARY TABLE
I have a pipe delimited file with some NULL date fields. I load this
Background: There's a stored procedure which does stuff with a temp table of a
Is there a way to define a temp table without defining it's schema up
Is there any way of determining whether or not a specific temp table has
In one of my queries there's an insert of data into a temp table.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.