SqlDbx
You are not logged in.
Pages: 1
Hi,
I am using an ODBC Connection to ServiceNow and write code using SqlDbx.
I have been having issues when trying to cast or convert a number.
A simple count(*) may return say 60 records, and I can confirm that the true number is 60, yet if I try the following cast or converts I get the below numbers:
convert(count(*), SQL_smallint) = 180
cast(count(*) AS DECIMAL(10,2)) = 180
cast(count(*) AS Numeric(10,2)) = 180
SELECT CAST (number AS DECIMAL(10,2))
FROM (
SELECT count(*) AS number
FROM incident
) = 180
I have tried downloading a new version of SqlDbx but no change. I use SqlDbx in a similar fashion on another account and do not get this issue.
Why is this happening?
Thanks
Kirsty
Offline
I am not sure what is going on here.
SqlDbx does not do any processing just retrieves and shows the data.
We do not have any experience with ServiceNow.
Do you have a way to run your queries using different tool?
Do results look correct in this case?
I am not sure I understand what you mean by "similar fashion on another account".
Offline
I have now tried running these scripts in various other programs and still get the wrong numbers. I think it must be something wrong with the ServiceNow Instance and have logged a ticket with them.
What I mean by "similar fashion on another account" is that I use SqlDbx to access a different companies instance of ServiceNow and I do not get these same problems.
Offline
Pages: 1