KnowledgeBase
a KnowledgeBase blog for my random thoughts and observations...
Friday, February 22, 2019
T-SQL to JSON
you need to use a varchar(max) else SSMS will limit it to 2033 chars
---------
declare @FSLI_JSON as varchar(max) = (
SELECT [col1]
, [col2]
, [col3]...
FROM [dbo].[myTable]
FOR JSON auto
)
SELECT @myJSON
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment