I have a query whereby parameters are being passed in in the format 'GRB','MIN','OSH' and so on. These are called "Divisions". They may be passed in singly or in a list of any number of them. These are used in one of the tables n a report. The problem is that the table I am going to read other divisions are going to have them in numerical format. so GRB = 02, MIN=04 and OSH = 08. There are 12 different values. So in essence, the SSRS report might pass in all these for an "IN" statement. They have to be presented in this manner. I need to find a way to convert all of these alphanumeric codes into their corresponding numeric codes. Main query with alphanumeric:
dbo.TQMNCR.PlantID IN (@PlantID)
Temp table with (hopefully) corresponding numeric values:
ProdTable.DIMENSION2_ in (????????)