select field equals to all in mssql

i try to figure out if a dropdownlist ddlcountry textfield = ALL, and the value is "A". if it is A, it will select all country as the search field in country in sql statement.

string strcategoryname = txtcatename.text
select * from (multiple tables) where categoryname = " + txtcatename.text + " AND country = " +  ?
LVL 1
doramail05Asked:
Who is Participating?
 
jgarzonConnect With a Mentor Commented:
string strcategoryname = txtcatename.text
string strCountryName = ddlCountry.Text
if strCountryName <> "A" then
select * from (multiple tables) where categoryname = " + txtcatename.text + " AND country = " +  strCountryName
else
select * from (multiple tables) where categoryname = " + txtcatename.text
end if
Second query does not need to filter on country as you want all of them..right?
 
0
All Courses

From novice to tech pro — start learning today.