Quantcast
Channel: SCN: Message List - SAP SQL Anywhere
Viewing all articles
Browse latest Browse all 2182

Re: SQL Anywhere 16.0.0.1915 json result

$
0
0

To elaborate on Lucjan's suggestion, you can create a table to store JSON object and insert into that table with your select statement. Once you have inserted it, you can select on the table and use replace function to get rid of '\' character.

 

Here is an example :

 

1)

 

CREATE TABLE JSONobj(

 

     jsonObject long varchar

 

)

 

2)

 

INSERT INTO JSONobj SELECT

(SELECT top 2 Identifier id, Description Text From Tax

order by id for json raw) as result,

(if (select count() from Tax ) > 2 then 'True' else 'False' endif) as more

for json raw;

 

3)

 

SELECT replace(JSONobj.jsonobject, '\', '') from JSONobj;

 

I know it requires more work, but this is one of a workaround.

 

Thanks.


Viewing all articles
Browse latest Browse all 2182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>