I have a dropdown list on my page that when selected I want to execute one of possibly 500 functions or stored procedures based on the one they select.
How would I place the code in the varchar field is such a way that I can pass in the variables?
For instance..example one below works because I have the text hard coded in the table
But how can I execute example 1 when placed in the table AND be able to pass in the 3 (or more) paramaters dependong on the row I'm trying to execute?
Declare @sqlText varchar(1000)
Set @sqlText = (Select sqlText from valueUCC_CollateralDescription where id = 1)
--Select @sqlText returns this value: 'sp_portal_UCCListGet 1,'','''