Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi all,
I have a query where one of the columns I'm selected is named "Value", so in my query it appears as:
SELECT .... PM.Value
It appears as if ThingWorx/SQL is treating this as a reserved keyword of some sort, nothing I do will allow me to have the word "Value" in SELECT statement. It always fails and returns the error:
Unable to Invoke Service <ServiceName> on <ThingName> : The connection is closed.
Solved! Go to Solution.
Ahhh, I found out my own issue...
Turns out the data type of the "Value" column was SQL_VARIANT, I needed to CAST it as a VARCHAR in this case.
SELECT ... CAST(PM.Value AS VARCHAR) ColName
Thanks.
Ahhh, I found out my own issue...
Turns out the data type of the "Value" column was SQL_VARIANT, I needed to CAST it as a VARCHAR in this case.
SELECT ... CAST(PM.Value AS VARCHAR) ColName
Thanks.