Azure Data Studio – Extension – “sqlops-spexecutesql-to-sql” ( v1.0.1 )

Background Wanted to give a quick update on the Azure Data Studio Extension, sqlops-spexecutesql-to-sql. Lineage Azure Data Studio – Extension – "sqlops-spexecutesql-to-sql" Original Post Date Posted :- 2019-August-24th Link Bug Report Outline Filed a bug. The code is on GitHub and path way to filling a bug it to : Sojourn to GitHub Access Pejman … Continue reading Azure Data Studio – Extension – “sqlops-spexecutesql-to-sql” ( v1.0.1 )

Transact SQL – STRING_AGG – Error – “Incorrect syntax near ‘within'”

Background Working on a script, but noticed an error when I tried to sort the data using the String_Agg within group clause. Code Let us reproduce using a sample data set. SQL Sample -01 SQL Output Sample -02 Outline If one reviews our output, one will notice that the cities are listed based on the … Continue reading Transact SQL – STRING_AGG – Error – “Incorrect syntax near ‘within'”

Transact SQL – JSON Functions – OPENJSON

Background The OpenJSON function allows us to shred a JSON Object into relational rows. Legend Here are earlier posts on Transact SQL & JSON :- Transact SQL – JSON Functions – JSON_VALUE & JSON_QUERY Link JSON Data Code Declare Table Variable & Add data SQL Output Queries Query -01 Outline In our first example, we … Continue reading Transact SQL – JSON Functions – OPENJSON

Transact SQL – JSON Functions – JSON_VALUE & JSON_QUERY

Background Whenever I see JSON mentioned I tighten up a bit, knowing it is one more thing to learn, and I just move on. Transact SQL Let us address how to use a couple of JSON Functions in Transact SQL. VALUE & QUERY Both functions are the same outside of the fact that one returns … Continue reading Transact SQL – JSON Functions – JSON_VALUE & JSON_QUERY

ANSI Standards – Database – Substring

Background Reviewing some SQL and wanted to point out a tiny dissimilarity between database platforms. Data Our test table is Oracle's SCOTT.EMP Here is what the data looks like :- Substring/Substr The HIREDATE is the only well formatted fixed length string. Its format is DD-MMM-YY. Query Oracle SQL Output Explanation Oracle relies on Substr to … Continue reading ANSI Standards – Database – Substring