Help On dropdown list condition

Posted by Vijayar under C# on 9/15/2011 | Points: 10 | Views : 1205 | Status : [Member] | Replies : 2
Hi

i have a drop down called country,I am binding values from country table.I need only once country name to be binded using condition
i.e if country name is already binded then it should not be binded again.How to do this by using condition not using query
i.e. select distinct countryname from table.I need by condition only

vijaya


Responses

Posted by: Naraayanan on: 1/6/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
please give a Query like this..
Select Distinct Countryname from tblcountry
Distinct means retrieve data without duplicate entries

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 1/7/2012 [Member] Silver | Points: 25

Up
0
Down

First of all your country master table should not have duplicate value, remove it from database itself.
Suppose your database has two rows having countryname same but their countryID must be different, so which countryID is actually solve your problem?
So better to Remove the duplicate row from master,
otherwise you can go ahead with query written by Narayanan.


Thanks,
Sanjay

Vijayar, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response