Toad World® Forums

Quick way to move within the Editor to find the query which produced a particular result set.


#1

If I have multiple result sets which are created from within the same Editor window, is there a quick way to find the statement which generated a particular result set?

Suppose I have a long query and I’ve placed several Select statements through it for troubleshooting. Consider the following very simple example.

Select * From INFORMATION_SCHEMA.COLUMNS
/*

Blah Blah Blah

/
Select * From INFORMATION_SCHEMA.TABLES
/

Blah Blah Blah

*/
Select * From INFORMATION_SCHEMA.KEY_COLUMN_USAGE

Now suppose that instead of the bogus comments I had large sections of code? This produces several result sets which I can switch between in the Results pane. However, if I want to go to the query which produced the 2nd result set, I have to manually look for it. Is there some faster way, perhaps by double clicking or right cliking in the Results pane to automatically jump to it within the editor?


#2

Yes, if you go to the messages tab in the result you can just double click on the line whose result you want the cursor to go to and it will move there.

I’m afraid from the result pane we don’t have that functionality right now. I will add an enhancement for it though because that’s a good idea.