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
 General SQL Server Forums
 New to SQL Server Programming
 Computed Column?

Author  Topic 

ann06
Posting Yak Master

171 Posts

Posted - 2008-04-05 : 10:26:47
i have a table that contains 2 columns

A B (B values are only 1 and 2)
-- --
x 1
y 2
z 1
x 2
z 1
j 1
k 2

i want to make a query that will check for dinstinct x what B values it has Ex. It will show result like this

result
A B
-- --
X 1 and 2
Y 2
z 1
K 2

how to make please help

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2008-04-05 : 12:18:18
check this out:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=53293

Be One with the Optimizer
TG
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-04-06 : 13:33:34
This will do exactly as you wish
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=81254

look for the post made 10/25/2007 : 10:00:18


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page
   

- Advertisement -