SQL Recall omitting comment line 6.2

I just went from version 6.05.425 to version 6.2.0.23226. It appears when SQLs are inserted into SQL recall they no longer save the comment rows before the SELECT/UPDATE statement. Was this by design or is it an issue and is there any way to force those comments to save?EX
--comment line
SELECT *
FROM mydatabase.mytable;
In this case the "--comment line" would be removed/lost.

Welcome to the TDP forum.
For clarity purposes to other readers, you are referring to the historical SQL Recall.

I'm seeing the same effect in my TDP, but on further testing, it appears that TDP does save any comments before the first executable SQL, but only those after the last double-dash comment encountered just prior to the first executable SQL. In other words, no lines are saved at or before the closest double-dash comment appearing right before the first executable line.

Here's an example. I executed the following SQL Server script in TDP's Editor...

/* comment 1 */
/* comment 2 */
-- comment 3
/* comment 4 */
SELECT * FROM
-- line comment here...
/* ... and here */
DimChannel;

-- comment shows now?
SELECT * FROM DimEmployee

... and here's what gets saved in my Recall list...

/* comment 4 */
SELECT * FROM
-- line comment here...
/* ... and here */
DimChannel;

-- comment shows now?
SELECT * FROM DimEmployee;

Notice that no comments prior to, and including, the first double-dash comment preceding the first executable line are present in the SQL Recall entry. I'll get Quest Dev team members to take a look at this, as it seems to be a regression.

Work-arounds for now? A couple of suggestions...

  1. Don't use double-dash comments before the first executable line of your script. Use slash-star comments instead.

  2. Place an innocuous executable SQL at the very start of your script. For example, if I type the query SELECT '1' as the first line to execute in my previous script, then TDP saves the following in my SQL Recall history upon execution, which includes every line now:

SELECT '1';
/* comment 1 */
/* comment 2 */
-- comment 3
/* comment 4 */
SELECT * FROM
-- line comment here...
/* ... and here */
DimChannel;

-- comment shows now?
SELECT * FROM DimEmployee

Ahh I see. I had already tried the /* with no -- comment and it didn't work/save for me. After your reply I started looking again and it appears that even the /* comment doesn't save if you use F9 (run current statement) which is what I always do. When using F5 run SQL it does save the /* comment into SQL recall. Thank you for the help with this. FYI I only use that comment as a quick reference in SQL recall for SQL I run monthly. It allows me to quickly find the specific ones to rerun without having to hunt for them.

Ah, what a great catch, and something i should have mentioned earlier.

F9 is an execution mode that only runs the SQL statement executable in or around your editor cursor placement at the time of execution... e.g. only that statement gets picked up, even if you have many queries/statements in your script logic.
So, yes, F9 will only save the current statement context.

F5 is the script execution mode that runs the entire contents of your Editor. Recall should save everything in this mode, assuming no errors in the script, but clearly there's a minor issue in that we may not pick up all the comments prior to the first executable statement.