Click here to Skip to main content
16,020,811 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
how to do not repeat data in my database

if we have example thank you ,
??
Posted
Comments
OriginalGriff 19-Aug-13 1:33am    
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
"not repeat data in my database" could mean anything - are we talking about reading data out, or putting data in? How are you doing whatever it is at the moment, because there are a huge range of ways it could be done!
Help us to help you!
Use the "Improve question" widget to edit your question and provide better information.
Sergey Alexandrovich Kryukov 19-Aug-13 2:22am    
Not clear at all...
—SA

1 solution

Give this code a try.
SQL
IF EXISTS (SELECT * FROM Table1 WHERE Column1='xyz')
    UPDATE.......
ELSE
    INSERT INTO Table1 VALUES (...)

Regards..:)
 
Share this answer
 
Comments
ahmed200 19-Aug-13 1:39am    
thanks , how to do not repeat in combobox using my databas
Thanks7872 19-Aug-13 1:41am    
Use Select DISTINCT clause while binding your Combobox.
ahmed200 19-Aug-13 1:47am    
have you example

iam insert in textbox , the text "ahmed" inserted more than one but i need show the text one in combo box

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900