-
Hello, the SQL in select *
from Order with(nolock)
where Id=$id After starting the program using SELECT
*
FROM
Order WITH (nolock)
WHERE
Id = CAST(@p1 AS VARCHAR(MAX)) It converts Is there a way to specify the type of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi ! select *
from Order
where Id = CAST($id AS INTEGER) |
Beta Was this translation helpful? Give feedback.
Hi !
HTTP URL parameters do not have a type. When you load
/order.sql?id=1000
, there is no way to know whether the URL parameter id is intended to be a number, or a string that just happens to only contains digits in this case. So SQLPage handles all parameters as strings by default. However, it's easy to convert the parameter to an integer in SQL when you need it. Just replace your SQL query with