Posting Yak Master
Posted - 01/02/2013 : 10:00:10
| I have to have this in a Function and can not convert it to a procedure since it is used in a cross apply.
Depending on the value to a parameter say @provider
i have to get the values from table Provider_A or table Provider_B
select @strSQL='SELECT @mil_adj_12months= [mileage_adjusted_12]
FROM residual_value_mileage_adjustments'+@table_suffix +
' WHERE yearly_mileage=@actual_annual_mileage and mileage_category=@Mileage_Category'
Can it be done ?
Edited by - AAAV on 01/02/2013 10:01:17