SQL Graph Support

It appears that SQL Prompt still does not completely support SQL Graph databases in SQL Server 2022 or Azure SQL Database:

Format SQL does not work correctly, or at all.
Add Square Brackets brackets Graph keywords when they shouldn't be.
Qualify object names does not work.
Suggestions do not work much of the time.

Currently, I'm testing with the Microsoft GraphDemo objects and code from Books Online.

Is this still a work in progress, or is something else required? I am using:

Azure SQL Database
SQL Server 16.0.4085.2
SQL Server Management Studio 19.2
SQL Prompt 10.14.1.4347
Tagged:

Answers

  • Eddie DEddie D Posts: 1,807 Rose Gold 5
    Hi, 
    Thank you for your forum post.

    Using the GraphDemo database from this Microsoft Learn document
    I am unable to replicate the reported fault symptoms in your forum post.

    I am able to format the T-SQL code selecting the various Redgate default style options (from SQL Prompt menu ->Active Style ->Either selecting a previous customer style or selecting a Redgate Default Style.  ->Fomat SQL / Ctrl+K, Ctrl+y). 

    Square brackets are not added (from SQL Prompt menu ->Options ->Format ->Styles ->Actions ->the Add/remove square brackets check box is checked with the Remove unnecessary brackets option).

    Suggestions operate as expected.  However, I may have difference in the SQL Prompt options to yourself.

    Qualify Object names worked as expected in my reproduction attempt:
     
    Before:
    INSERT INTO locatedIn&nbsp;<br>    VALUES ((SELECT $node_id FROM Restaurant WHERE ID = 1), (SELECT $node_id FROM City WHERE ID =1))&nbsp;<br>         , ((SELECT $node_id FROM Restaurant WHERE ID = 2), (SELECT $node_id FROM City WHERE ID =2))&nbsp;<br>         , ((SELECT $node_id FROM Restaurant WHERE ID = 3), (SELECT $node_id FROM City WHERE ID =3));
     
    After Qualify Object Names:
    INSERT INTO locatedIn<br>    VALUES ((SELECT Restaurant.$node_id FROM Restaurant WHERE Restaurant.ID = 1), (SELECT City.$node_id FROM City WHERE City.ID =1))<br>         , ((SELECT Restaurant.$node_id FROM Restaurant WHERE Restaurant.ID = 2), (SELECT City.$node_id FROM City WHERE City.ID =2))<br>         , ((SELECT Restaurant.$node_id FROM Restaurant WHERE Restaurant.ID = 3), (SELECT City.$node_id FROM City WHERE City.ID =3));
    I believe the version of SQL Prompt and SSMS are identical to you:
    SQL Prompt V10.14.1.4347
    SSMS 19.2 / 19.2.56.2

    I do have a difference in SQL Server Version, in that I am using an On-premise SQL Instance of SQL 2022 / 16.0.1105.1.

    What options do you have configured in your SQL Prompt Menu ->Options ->Format ->Styles ->Actions?

    Many Thanks
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • I have also tried this using a local SQL Server instance, version 16.0.4085.2

    I have all the Microsoft Learn example code in one script, when I format using my options, the following error(s) are introduced into a previously error-free script:



    My options are:


  • Another syntax error introduced by reformatting:


Sign In or Register to comment.