954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Avoid Duplication

Hi,

I am working on one inventory control project in that I have one combo box in the combo box I am showing all the product name but in database their is duplication of product name when user sale one product then it save in the table. So the user sale one product for 3 times then it displays three time name in the combo box. I want to show only once time product name.

Is their is any solution for this problem.

virusisfound
Junior Poster
172 posts since Jun 2010
Reputation Points: 10
Solved Threads: 2
 

Use SELECT DISTINCT clause.

SELECT DISTINCT ProductName FROM TABLE


Or - use GROUP BY.

__avd
Posting Genius (adatapost)
Moderator
8,648 posts since Oct 2008
Reputation Points: 2,136
Solved Threads: 1,241
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You