select distinct a.au_lname,c.customerid
from pubs.dbo.authors a,northwind.dbo.customers c
--what would the join condition be here
select au_lname,'authors' as tablename from pubs.dbo.authors
union all
select customerid ,'customer' as customers from northwind.dbo.customers
âI sense many useless updates in you... Useless updates lead to fragmentation... Fragmentation leads to downtime...Downtime leads to suffering..Fragmentation is the path to the darkside.. DBCC INDEXDEFRAG and DBCC DBREINDEX are the force...May the force be with you" --
http://sqlservercode.blogspot.com/