I have a SQL table like :
Name Value
alex ph 0.5
max pr 0.4
jean ph 0.6
I want to create a stored procedure where i put as a variable the two last letter of the column’s name member and it return the corresponding row like :
exec sp_2lett @lastL = 'ph'
gives
Name Value
alex ph 0.5
jean ph 0.6
In SQL Server you can do the following: