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

  • SEARCH
  • Home
  • 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 9139153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:21:02+00:00 2026-06-17T09:21:02+00:00

I have created a view that fills data from different tables. I used 10

  • 0

I have created a view that fills data from different tables. I used 10 select statements and combine the results of those select statements using UNION ALL.

I want to add primary key column to my view. because I have to create XML file using data in this view. so I need a primary key column for some process in my XML building application.

I have add rownum to all my select statements. But it returned duplicate ids. because rownum in each select statements start from 1.

Then I have created a sequence and tried use nextval . But I can’t use sequence because my select statements has group by and order by.

Is there any way to do that ?

  • 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-17T09:21:03+00:00Added an answer on June 17, 2026 at 9:21 am

    You can do a select over the union, for example:

    SELECT rownum(),*
    FROM (SELECT * FROM tableA UNION ALL SELECT * FROM tableB)
    

    UPDATED

    SELECT rownum, t.*
    FROM (SELECT * FROM tableA UNION ALL SELECT * FROM tableB) t
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a view that creates a new core data managed object, and fills
tl;dr: I need to show data from two different tables in the list view
I have created a custom ArrayAdapter that fills a ListView . The data in
I have created an AsyncTask that loads data from a website then when I
I have created a list view that displays the names and dates of items
I have a partial view that I have created called noteEditor. That is rendered
i have created one login and register view in that view after login user
if i have created a view model and have a partial form that is
I have created a street view backbone view. The problem is that when shown,
I have a custom tableview cell created programmatically that consists of: a background view

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.