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 |
Jster
Starting Member
21 Posts |
Posted - 2006-11-14 : 11:10:04
|
Been tasked with creating a sql statement that will return a list of distinct numbers. I'll try to illustrate it belowFirstTable SecondTableID IDNo NoCent CentActual RecordsFirstTable SecondTable10 1001 1 10 1001 110 1001 2 10 1001 210 1002 3 10 1002 310 1003 3 10 1003 3 10 1003 4What I'm trying to get are all of the "Cent" fields. Basically the list belowCent---------1234Any information would be appreciated.Thanks,Josh |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-11-14 : 11:13:00
|
select distinct cent from FirstTableGo with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-11-14 : 11:19:00
|
select cent from firsttableunionselect cent from secondtablePeter LarssonHelsingborg, Sweden |
 |
|
Jster
Starting Member
21 Posts |
Posted - 2006-11-14 : 11:22:08
|
Thank you, that worked.Thanks,Josh |
 |
|
|
|
|