I have a listbox where a user selects multiple items. I am building a list with selected items and then I want to use that list to extract values from a table. The list can vary depending on how many thing the user selects from list box. How can I write a query based on items from the list.
for example I have a list built using commas
how do I write a query that selects units that contain values from lcList?
for example:
select * from vehicle where v_unit = the lcList
I can write
select * from vehicle where v_unit = 'CAMP' or v_unit = 'JUV' or v_unit = 'ADULT'
but my list can vary depending on items selected from list box and I don't how to write a query where v_unit can be dynamically used.
thanks
Nick