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.
| Author |
Topic |
|
gregsenne
Starting Member
7 Posts |
Posted - 2009-09-18 : 14:26:11
|
| I want to run both queries below TOGETHER so they return the results together, and only show the distinct results from both.SELECT DISTINCT NAME FROM TRIGGERSSELECT DISTINCT NAME FROM TEMPLATESCan I do this?Thanks |
|
|
patshaw
Posting Yak Master
177 Posts |
Posted - 2009-09-18 : 14:49:41
|
| select a.[name], b.[name]from(SELECT DISTINCT NAME FROM TRIGGERS) a,(SELECT DISTINCT NAME FROM TEMPLATES) b |
 |
|
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2009-09-18 : 15:05:49
|
quote: Originally posted by gregsenne I want to run both queries below TOGETHER so they return the results together, and only show the distinct results from both.SELECT DISTINCT NAME FROM TRIGGERSSELECT DISTINCT NAME FROM TEMPLATESCan I do this?Thanks
SELECT DISTINCT NAME FROM TRIGGERSunionSELECT DISTINCT NAME FROM TEMPLATES |
 |
|
|
gregsenne
Starting Member
7 Posts |
Posted - 2009-09-18 : 15:36:28
|
| vijayisonly, THANKS! Worked perfectly |
 |
|
|
|
|
|