hey all,
Name, Inv(y/n), Desc
--
Cust1, null, Desc1
Cust1, null, Desc2
Cust1, Y, Desc1
Cust2, null, Desc1
Cust2, Y, Desc2
How would i select distinct customer names and get all the fields in my
result at the same time?
i know about select distinct name from table
but that only gives my 1 column and i need all the fields to show up.
thanks,
ariAri
The DISTINCT clause applies to ALL columns in the column list of the SELECT
statment. Based on the data you supplied, what are you expecting for the
resultset?
HTH
Jerry
"ari" <ari@.discussions.microsoft.com> wrote in message
news:0FEB617D-F1D3-4B11-A099-B375DB03D4A0@.microsoft.com...
> hey all,
> Name, Inv(y/n), Desc
> --
> Cust1, null, Desc1
> Cust1, null, Desc2
> Cust1, Y, Desc1
> Cust2, null, Desc1
> Cust2, Y, Desc2
> How would i select distinct customer names and get all the fields in my
> result at the same time?
> i know about select distinct name from table
> but that only gives my 1 column and i need all the fields to show up.
> thanks,
> ari|||ok i understand now. Thank you.
"Jerry Spivey" wrote:
> Ari
> The DISTINCT clause applies to ALL columns in the column list of the SELEC
T
> statment. Based on the data you supplied, what are you expecting for the
> resultset?
> HTH
> Jerry
> "ari" <ari@.discussions.microsoft.com> wrote in message
> news:0FEB617D-F1D3-4B11-A099-B375DB03D4A0@.microsoft.com...
>
>
Friday, February 24, 2012
how to question
Labels:
database,
desc-cust1,
desc1cust1,
desc1cust2,
desc2cust1,
desc2how,
distinct,
inv,
microsoft,
mysql,
null,
oracle,
select,
server,
sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment