skip to Main Content

How to have JSON subquery return empty array rather than null when there are no rows

I have a (hypothetical) JSON schema that calls for a document to look like: [ { "tableName": "Embeddings", "object_id": 1301579675, "type_desc": "USER_TABLE", "create_date": "2023-05-03T19:41:56.940", "indexes": [ { "name": "PK_Embeddings", "type_desc": "CLUSTERED", "is_unique": true, "is_primary_key": true }, { "name": "IX_Embeddings_DimValue", "type_desc":…

VIEW QUESTION

Trouble generating Entity Framework Core models from Azure SQL Database using dotnet ef dbcontext scaffold

I'm facing an issue when trying to generate Entity Framework Core models from an Azure SQL Database using the dotnet ef dbcontext scaffold command. Connection String Server=[server name].database.windows.net;Database=[database name];User ID=;Password="[password]";Encrypt=True;TrustServerCertificate=False;Connection Timeout=30; Command Used dotnet ef dbcontext scaffold "Server=[server name].database.windows.net;Database=[database name];User…

VIEW QUESTION

Normalize nested JSON into multiple tables

I have a table where each row contain nested JSON. I want to normalize this JSON into multiple tables with data. For example below is the JSON for 1 row. { "Arn":"UNLQ5HFPVXMX7", "Merchant":"UNL", "Aun":"aad9561d-17bc-4280-a44f-7fd4cdb2c57a", "ExternalArn":"b7e6d3da-4b63-44a8-adfc-884cce34288d", "Status":"Commenced", "PageIdentifier":"ValidationResult", "ProductRate":{ "RollRate":false, "IsFromRate":false…

VIEW QUESTION

Error = [Microsoft][ODBC Driver 18 for SQL Server]Invalid date format when using Azure SQL Server

I need to move table from an Azure SQL database to another database Firstly, I have exported data from table by using below query: select contract_id, contractor_name, plan_id, quantity, format(exec_date, 'yyyyMMddHHmmssffff') as exec_date, initial_plan, contract_status, backup_disksize, format(register_date, 'yyyyMMddHHmmssffff') as register_date,…

VIEW QUESTION
Back To Top
Search