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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 simple query

Author  Topic 

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2003-07-21 : 06:04:44
hi,
I have a table A1 (Email varchar(100))
and second Table B1 (Email Varchar(100))


A1
tom@abc.com
fdsa@csa.com



B1
harshal@hotmail.com
sachin@hotmail.com

I need a query which will return the email ids in a single result set like:

Email
tom@abc.com
fdsa@csa.com
harshal@hotmail.com
sachin@hotmail.com



Is this possible?
please help.
Regards,
harshal

The Judgement of the Judge is as good as the Judge.

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2003-07-21 : 06:08:17
ok ,
I got it by using union.


The Judgement of the Judge is as good as the Judge.
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2003-07-21 : 10:37:40
Wow 4 minutes...pretty good self help..but just for the others...


SELECT Email FROM A1 UNION SELECT Email FROM B1

Any Predicates?




Brett

8-)
Go to Top of Page
   

- Advertisement -