Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identify Tables in UNION Query

Status
Not open for further replies.

bmc1234

Programmer
Jul 21, 2005
50
US
I have a UNION query grabbing information from two tables. Does anybody have any ideas on how to identify which rows came from which tables?
 
Code:
Select 'tblA' As [TableName], tblA.* From tblA
UNION ALL
Select 'tblB', tblB.* From tblB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top