I have a query which calculates a number... but by default the number is represented as a 64 bit integer. I cannot remember the function name but it is only using SQL9.0 built in functions. Is there a way to cast the number?
This is not a trivial issue since I have found an easier way to do this which did not involve the number, although any input would be greatly appreciated.
Thank you :)
I don't quite understand your question. But you can cast a value to a different data type using CAST function. You may or may not get runtime errors depending on the data. See Books Online for more details. So in your query, you can do something like below:
select cast(<expr> as int)
from ...
No comments:
Post a Comment