What are the challenges you face when working across database platforms? Take the survey
Options

SQL Prompt mangles statements when certain key combinations

blitzdblitzd Posts: 40
edited April 14, 2015 2:16PM in SQL Prompt Previous Versions
...occur.

An example:
INSERT INTO admin.TestTable
        ( ID ,
          TestColumn ,
          TestColumnDateTime
        )
VALUES  ( 0 , -- ID - int
          '' , -- TestColumn - char(10)
          '2013-01-28 21:19:58'  -- TestColumnDateTime - datetime
        )

I have the 0 (ID) highlighted so that I can alter it, it hit 1 and then in very quick succession the down key to start editing the TestColumn value, and I get this:
INSERT INTO admin.TestTable
        ( ID ,
          TestColumn ,
          TestColumnDateTime
        )
VALUES  ( 1 , -- ID - int
          ' , -- TestColumn - char(10)
          '2013-01-28 21:19:58'  -- TestColumnDateTime - datetime
        )
The closing quote of the TestColumn value has disappeared. I can re-create this quite easily when the sql prompt code suggestions are enabled, and when it is disabled I do NOT see this behaviour at all.

I have been noticing something corrupting my scripts for the last few months now - it often manifests itself by mangling the last characters in a statement. For instance, something like:
SELECT  ID ,
        TestColumn ,
        TestColumnDateTime
FROM    admin.TestTable
ORDER BY ID DESC

I will often find after editing something else in the statement that it has ended up as:
SELECT  ID ,
        TestColumn ,
        TestColumnDateTime
FROM    admin.TestTable
ORDER BY ID DESCC

I do not know what key combination leads to that, but again - it doesn't occur when SQL Prompt suggestions are disabled.

Comments

Sign In or Register to comment.