|
-
Feb 11th, 2003, 08:45 PM
#1
Thread Starter
Lively Member
Combo Boxes
I am populating a combo box with a column froma database,
the problem I have is this column has duplicate values. So I get 2 or three of the same values. Is there anyway to eliminate duplicates and only have one of each value in the combobox?
-
Feb 11th, 2003, 08:52 PM
#2
PowerPoster
When you are running the sql statement, use the DISTINCT keyword:
This way will get you all the rows in the column including duplicates:
SELECT myColumn FROM MyTable
This way will only return the rows that are not duplicates:
SELECT DISTINCT myColumn FROM MyTable
-
Feb 11th, 2003, 09:51 PM
#3
Thread Starter
Lively Member
Thanks!!
Thats exactly what I need!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|