I have a dropdown on page when user selects any value from it ; i am passing that value and filtering the result.
suppose if user select any bike from dropdown then from user table only those record should come which have that
bike and also those records should come where user have not any bike .
username vehicleID
========= =======
john 1
peter 1
maria 2
raso
pritam 4
if user selects vehicleID 2 then raso should also come along with maria.
I do not want to use UNION for this .
IF user does not select any thing all data should come by default on page
any other idea. thanks in advance
Use the following query, where the
@VehicleIDis theSelectedValueof thedropdownlist.