Last post Jul 23, 2020 02:28 PM by PatriceSc
Member
35 Points
156 Posts
Jul 23, 2020 02:13 PM|binustrat|LINK
Hi All,
One of the my query working fine in my local. But giving error in server Below giving sample query
select 'b' as name for json path this query giving expected result in local
[{"name":"b"}]
But this same query giving error in server. Below is error
Msg 102, Level 15, State 1, Line number 1 Incorrect syntax near 'json'.
Please let me know whats the reason giving error in server
All-Star
48570 Points
18081 Posts
Jul 23, 2020 02:28 PM|PatriceSc|LINK
Hi,
You tried SELECT @@version to check which SQL Server you are using? More likely you have a local SQL version which is newer than the server side SQL Server version. If not maybe https://www.sqlskills.com/blogs/glenn/database-compatibility-level-in-sql-server/ matters for that ?
Member
35 Points
156 Posts
for json path giving error in server
Jul 23, 2020 02:13 PM|binustrat|LINK
Hi All,
One of the my query working fine in my local. But giving error in server Below giving sample query
select 'b' as name for json path this query giving expected result in local
[{"name":"b"}]
But this same query giving error in server. Below is error
Msg 102, Level 15, State 1, Line number 1
Incorrect syntax near 'json'.
Please let me know whats the reason giving error in server
All-Star
48570 Points
18081 Posts
Re: for json path giving error in server
Jul 23, 2020 02:28 PM|PatriceSc|LINK
Hi,
You tried SELECT @@version to check which SQL Server you are using? More likely you have a local SQL version which is newer than the server side SQL Server version.
If not maybe https://www.sqlskills.com/blogs/glenn/database-compatibility-level-in-sql-server/ matters for that ?