Home

REQUEST : Replace "GO" with appropriate provider "batch-delimiter".

When the sql is outputted, the "GO" statement is inserted. Which is the proper batch-delimiter for Sql Server.

If the provider is Oracle (for example), prefer a ";" batch-delimiter over a "GO" batch-delimiter.

Example Below.

SELECT "m"."MyParentUUID", "m"."MyParentName", "m"."UpdateDateStamp"
FROM "MYORACLESCHEMAONE"."MyParent" "m"
GO

SELECT "i"."MyParentUUID", MAX("i"."UpdateDateStamp") "MaxPerParentUpdateDateStamp"
FROM "MYORACLESCHEMAONE"."MyChild" "i"
GROUP BY "i"."MyParentUUID"
GO

When the provider is Oracle, prefer to have:

SELECT "m"."MyParentUUID", "m"."MyParentName", "m"."UpdateDateStamp"
FROM "MYORACLESCHEMAONE"."MyParent" "m"
;

SELECT "i"."MyParentUUID", MAX("i"."UpdateDateStamp") "MaxPerParentUpdateDateStamp"
FROM "MYORACLESCHEMAONE"."MyChild" "i"
GROUP BY "i"."MyParentUUID"
;

or similar.********

Comments

  • Can I ask for what reason?

    The 'GO' keyword is not sent to the database server - it's parsed by the LINQPad client and then each batch is sent separately to the server. So it will work with any back-end.

  • GO works for Sql Server (SSMS).

    GO is not 'Oracle Sql Developer' or TOAD friendly.

  • Right, it works ok with LinqPad. It is when I take that query and put it in Oracle Sql Developer directly.

    Which points to another possible mini-feature.

    "Analyse SQL" would have a "Custom Tool".. and that tool could be defined.........

    "Analyse SQL" .. "popping" to Oracle Sql Developer.

    Kinda like how you can setup different code merge tools in Visual Studio.

Sign In or Register to comment.