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

  1. 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 :

  1. Sojourn to GitHub
  2. Access Pejman Nik’s page ( Link )
  3. Access Repository ( sqlops-spexecutesql-to-sql )
  4. Access Issues Tab

The URL is here.

Image

 

Deploy

Deploy patch.

Outline

  1. Download Patch
  2. Install Patch
    • Initiated Azure Data Studio
    • Install Extension from VSIX Package
      • Access Application Menu
        • Menu File \ Install Extension from VSIX Package
      • Chose to load the VSIX file

 

Use

Outline

  1. Entered SQL Text
  2. Clicked F1
  3. Chose sp_executesql to sql : Convert
  4. Review converted SQL

Tasks

SQL Text :- Entered


sp_executesql
       N'select *
        from WideWorldImporters.Application.Countries
        where CountryName =  @_msparam_0'

     , N'@_msparam_0 varchar(4000)'

     , @_msparam_0=N'Brazil'

SQL Text :- Formatted


DECLARE @_msparam_0 varchar(4000)
SET @_msparam_0=N'Brazil'

select *
from WideWorldImporters.Application.Countries
where CountryName =  @_msparam_0

Images

SQL Text – Entered

SQL Text – Formatted

Commendation

Big Commendations to Pejman Nik.

 

Summary

So the quick fix is to deploy Version 1.0.1.

 

Pejman Nik’s fix was to apply changes to the Regular Expression Text.

He modified his code to gracefully manage “extra white characters” in the submitted SQL Text.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s