472,102 Members | 2,115 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,102 software developers and data experts.

SQL Command

173 100+

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

in this list there are duplicates... for example


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 1168
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
SELECT distinct provider FROM table_name
Jan 9 '07 #3
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
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.