I want to write a stored procedure for the following SQL Server table:
No Date Days Percentage
1 17-Aug-12 2 -0.34%
2 3-Aug-12 15 -29.39%
3 27-Jul-12 22 12.02%
4 20-Jul-12 29 -0.64%
5 13-Jul-12 36 -3.45%
6 6-Jul-12 43 -99.93%
7 29-Jun-12 50 41.26%
Here I want to pass parameter to the percentage column or the days column dynamically.
Please help wite a stored procedure to select only percentages in a range say ‘12% – 15%’
To simply check against percentage…
For more complex checking (where the table and/or fields are specified dynamically) then you could be looking at building a TSQL string to be run against
sp_executesql.