I have a ssrs report which is pulling data based on user first name and last name .
Lookup Id'S using first name and last nameusing WHERE (FirstName LIKE @ParameterFirstName) OR
(LastName LIKE @ParameterFLastName)
gives me list of values with id's which can be of only two types(pattern) -1. xyz123456 2.xyz789543-1234567890
Say I enter @ParameterFLastName like "James"
xyz123456-Ted James
xyz789543-Rod James
xyz789543-1234567890-Neil James
I thus show a data to user appending id with '-' full name
Now this becomes my dropdown( say @parameteruser) for user to select
xyz123456-Ted James
xyz789543-Rod James
xyz789543-1234567890-Neil James
Now when user selects one among the above list .
I want to pass only the selected id
to the maindataset to pull the report with other attributes.
so my main dataset query is like
where user in @parameteruser
But I want to pass only ids here which is -"xyz123456" and not xyz123456-Ted James
I m thinking of using left function but little scared as ID might grow large to parse out the anything before -
Any thoughts appreciated