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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select fields accros multiple dbs..

Status
Not open for further replies.

M2E

IS-IT--Management
Aug 1, 2005
28
0
0
GB
Hi there - Happy New Year!!

I am trying to use the SELECT DISTINCT statement to create one list of email address I have which are in two different databases, I have tried the below syntax, but does not seem to work...can anyone please tell me where I am going wrong!!!

Thanks in advance....

SELECT DISTINCT m2e_db.email, events_bookings.email FROM m2e_db, events_bookings

----Ment2Excel (M2E)----
--LEARN BY EXAMPLE--
 
Code:
select
m2e_db.email
from m2e_db
union
select
events_bookings.email
from events_bookings
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top