SQL Prompt not totally ignoring commented code
MikeyC
Posts: 249 Bronze 3
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
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
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