Skip to content

Add new key with value = NULL to existing JSON object

I have the following simple JSON object: I’d like to add a new key under application called “approve_date” and would like the value to be NULL. Is there a way to do this with JSON_MODIFY. I tried using ‘append’ in the path but this added an array, not a key (example below). What …

SQL optional parameter

I’m struggling to set optional parameter in MS SQL 2017. It should do: If parameter is null, then ignore the condition, but apply other conditions If parameter is set, then apply the condition …