| Author |
Topic  |
|
|
ashley.s
Starting Member
Mauritius
9 Posts |
Posted - 05/27/2012 : 03:13:35
|
Hello, I have 3 tables. All three tables have a column called name of person. I need to find details about the name of the person.See syntax below.
select [Cage 1GdB].NameAddofAdd, [Cage 2GdB].NameAddofAdd, [Cage 3GdB].NameAddofAdd from [Cage 1GdB], [Cage 2GdB], [Cage 3GdB] where NameAddofAdd = 'ALISON SONY ROYAL ROAD BELVEDERE, LALLMATIE' |
|
|
SwePeso
Patron Saint of Lost Yaks
Sweden
29138 Posts |
Posted - 05/27/2012 : 08:25:04
|
SELECT NameAddOfAdd FROM ( select NameAddofAdd FROM [Cage 1GdB] UNION SELECT NameAddofAdd FROM [Cage 2GdB] UNION SELETC NameAddofAdd FROM [Cage 3GdB] ) AS d WHERE NameAddofAdd = 'ALISON SONY ROYAL ROAD BELVEDERE, LALLMATIE'
N 56°04'39.26" E 12°55'05.63" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
India
47189 Posts |
Posted - 05/27/2012 : 11:33:17
|
quote: Originally posted by ashley.s
Hello, I have 3 tables. All three tables have a column called name of person. I need to find details about the name of the person.See syntax below.
select [Cage 1GdB].NameAddofAdd, [Cage 2GdB].NameAddofAdd, [Cage 3GdB].NameAddofAdd from [Cage 1GdB], [Cage 2GdB], [Cage 3GdB] where NameAddofAdd = 'ALISON SONY ROYAL ROAD BELVEDERE, LALLMATIE'
how should be your output? you want them in different columns or inside single column as values?
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
|
 |
|
| |
Topic  |
|
|
|