Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Unions: specify which table info came from

Author  Topic 

bdelaney
Starting Member

7 Posts

Posted - 2005-02-16 : 14:15:36
I have a query with a union. I am trying to find information that exists in one of two tables, is there a way I return a variable of some sort to tell my application which table it came from?

bdelaney
Starting Member

7 Posts

Posted - 2005-02-16 : 14:21:48
i'd like to retract that question, i must have been having a brainfart or something
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-02-17 : 06:24:23

Select *,'Table1' as TableName from table1
union
select *,'Table2' as TableName from table2

Madhivanan
Go to Top of Page
   

- Advertisement -