469,643 Members | 1,256 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

SQL Command

173 100+
Hi,

i have a combobox that shows a list of providers...............

in this list there are duplicates... for example

1.BT
2.CABLE
3.BT
4.BT

so there are three BT's.......

is there an SQL statement that i can use that will only show BT once?
anyone know this SQL?
Jan 8 '07 #1
3 1147
ronverdonk
4,258 Expert 4TB
You can establish that by using the GROUP BY attribute, as in
[php]SELECT provider FROM table_name ORDER BY provider GROUP BY provider[/php]
(ORDER BY sorts the list of providers)

Ronald :cool:
Jan 8 '07 #2
prileep
20
SELECT distinct provider FROM table_name
Jan 9 '07 #3
ronverdonk
4,258 Expert 4TB
SELECT distinct provider FROM table_name
You are right of course! What was I thinking?

Ronald :cool:
Jan 9 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by TEK | last post: by
8 posts views Thread by Siemel Naran | last post: by
34 posts views Thread by Roman Mashak | last post: by
13 posts views Thread by Chris Carlen | last post: by
reply views Thread by czerwww | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.