Monday, 11 August 2025

Convert Sql select statement result into JSON formate .

Formats the query result as JSON using the 'FOR JSON PATH' mode, where you have full control over the JSON structure by using column aliases.

SQL Query:-

SELECT 

    FirstName,

    LastName

FOR JSON PATH, WITHOUT_ARRAY_WRAPPER

JSON Output- 

{"FirstName":"Ajit","LastName":"Agarwal"}


No comments:

Post a Comment

Secure and Unsecure configuration in Dynamics CRM 365.

Overview : In Dynamics CRM, when we create a plugin, we sometimes need to pass data to that plugin, instead of writing this data inside the ...