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+
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 1168
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
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.