Hello I need to write a JSON into a SQL column during a insert in a stored procedure.
Something like:
INSERT INTO TableA (ColumnA)
SELECT
'{"PropertyA":' + '"' + valueA + '"' + ',"PropertyB":' + '"' + valueB + '"}
FROM TableB
The above works, and it inserts the following: {"PropertyA:""SomeValue","PropertyB:""AnotherValue"}
But I'm hoping to format the statement into something more legible using SQL Functions if they exist.