I have a table in MSSQL that has several columns. It looks as follows:
col1| col2 | col3
------------------
HSP | full | ""
HSP | full | "UE"
HSP | min | ""
HSP | min | "PS"
CC | full | "UE"
My select query has 2 parameters, which receives from web app:
@col2 = { full, min }
@col3 = e.g. "PE+UE+STR" or "PE" or "" (in general - combination of different abbreviations or none)
All i want to do is to select only those rows, which contain the appropriate abbreviation.
e.g. if the input is
@col2 = "full"
@col3 = "PE+UE+STR"
output:
HSP | full | "UE"
CC | full | "UE"
if @col3 = ""
, the output would be:
HSP | full | ""
HSP | min | ""
Thanks for any help.
Marcin