Jump to content

Is this possible...showing table record belongs to in a UNION


eludlow

Recommended Posts

I have a large data set that for various reasons is split over 12 tables, with identical structures.  I know this sounds slightly odd, but trust me, I have to manage the data this way :(

 

Anyway, I have a query that "UNIONS" certain records from each table into one view, which all works fine.

 

However, is it possible, when querying the database, to find out which table each record belongs to?

 

So I have, let's say, 12 rows in my view, one from each table and I want to not only extract the data from each column of each row, but the "originating" table the data is in?

 

I can do this by searching each table it MAY be in, but that seems a bit long winded.

 

Many thanks,

Ed Ludlow

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.