SQL Prompt not totally ignoring commented code

CodantiMCodantiM Posts: 245
edited April 23, 2008 1:42PM in SQL Prompt Previous Versions
Given this example:

RAISERROR ('The E_R_U has <cursor1> completed successfully today.', 18, 1) WITH SetError;

<cursor2>

/*
DECLARE
@Id int,
@dBegin datetime,
@Run_dt datetime,
@Update_dt datetime;

BEGIN

END;

GO
*/


If you type 'not<space>' at <cursor1> SQL Prompt will convert the not to upper case (NOT) even though it is inside single quotes.

if at cursor2 you type:

SELECT *, sptt.<cursor3> FROM [master].dbo.spt_monitor sptt

It won't bring up proper suggestions at <cursor3>.

If I remove the commented section, between /* and */, it appears to work OK.

This is running SQL Prompt 3.6.0.109

Comments

  • I just upgraded to 3.8.0.244, and this is still sort of an issue, but it appears to be related to bad SQL.

    If you put a -- in front of <cursor2> it doesn't capitalize not when you type it inside of the quotes. (I don't think it ever should anyhow.)

    Also,

    Try to type a single line comment with a ' in it. For example in a brand new query window:

    --This view won't include all data

    and you will end up with:

    --This view won't include all data'

    It added an extra ' trying to close the one I typed, but it shouldn't as it is in a comment.

    Michael
Sign In or Register to comment.