I have a dynamic SQL SP that acts on dynamically created tables.
A particular query that this SP dynamically generates is given as:
SELECT * FROM [DYNAMIC_TABLE] WHERE [RATE] BETWEEN '0.0' AND '10.0'
Note that the column [RATE]
is of type Float
.
However the same query fails for another dynamically created table in which the [RATE]
columns is of type Int
. I understand that this is because of the single quotes around the parameters.
What is the reason for this behavior difference?