Returning to diagram from editor

If I create a query via Query builder diagram and “Run SQL”, there appear two tabs at the bottom; Diagram and Results, which allows me to toggle back to the diagram.

If after diagraming the query in Query Builder I Open the sql statement in the editor, and then Run SQL, I see the SQL in the editor, but I don’t have a tab to get me back to the diagram.

Can you tell me how to get back to the original diagram from the Editor?

The Editor and the Query Builder are two different document types. What Open in Editor does it open up an Editor document with the SQL Statement you constructed.

To get back to the Query Builder, look at the top of the editor and you should see the tabs of each document. Simply click on the Query Builder document.

You can also take any editor SQL, right click it and select Visualize and it will build a Query Builder diagram (or at least try, complicated joins and nested subqueries can give it trouble sometimes).

My problem is that I don't see the query builder tab that you show in your example.

Here is a picture of my screen, but I don't know how to post it in an expandable format.

On the far right, where the tabs are, there is a down arrow. Click that and you should see a list of currently open documents.

Do you see your QB file?

No, it just shows Editor Untitled 1, Editor Untitled 2, etc.

Just the equivalent of the tables. No Query Builder.

From: Ryan Johnson [mailto:bounce-RyanJohnson@toadworld.com]

Sent: Thursday, December 10, 2015 11:05 AM

To: toaddatapoint@toadworld.com

Subject: RE: [Toad Data Point - Discussion Forum] Returning to diagram from editor

RE: Returning to diagram from editor

Reply by Ryan Johnson

On the far right, where the tabs are, there is a down arrow. Click that and you should see a list of currently open documents.

Do you see your QB file?

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad Data Point - General
notifications altogether.

Toad Data Point - Discussion Forum

Flag
this post as spam/abuse.

How are you opening the SQL in Editor? I assume it is not from the sql tab on the Query Builder window because that leaves the Query Builder there.

Try this to see your SQL:

and this to get back:

Before when I said you can right click the sql in Editor and visualize (older versions), the newer versions its right click Advanced/Send to Query Builder.

Ok, thanks, that Advanced/Send seems to work. It seems to be reconstructing the diagram via reverse engineering, rather than retrieving the diagram from an archive.

And I think I see what is happening to my query builder tabs (although not sure why editor tabs remain).

I am using Import Wizard to ETL between databases.

In order to get Import wizard to populate the target box correctly, I need to have the “target” database open at the time I click the “add query” button ( and NOT have the source open).

But first to generate the extract sql for the source (so it can be pasted into the “add query” wizard screen) I need to have source database open.

So I open the source database, use query builder to get the sql, and then I have to close the source database so the Wizard won’t get confused (just want target open).

When I disconnect from the source database, TDP asks me if I want to save the source ETL query, which I say no, because I already have CNTL-C it for pasting into the wizard.

But it only deletes the tab for the Diagram, not the Editor. So that’s why (after a few uses of Import Wizard), I have a string of Edit tabs with no matching query builder tabs.

From: GregDavis11009 [mailto:bounce-GregDavis11009@toadworld.com]

Sent: Thursday, December 10, 2015 12:05 PM

To: toaddatapoint@toadworld.com

Subject: RE: [Toad Data Point - Discussion Forum] Returning to diagram from editor

RE: Returning to diagram from editor

Reply by GregDavis11009

Before when I said you can right click the sql in Editor and visualize (older versions), the newer versions its right click Advanced/Send to Query Builder.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad Data Point - General
notifications altogether.

Toad Data Point - Discussion Forum

Flag
this post as spam/abuse.

Glad that worked for you. You can have both connections open when you start the Import Wizzard, just make sure you double click on the target connection before launching the Import Wizzard so the target connection is the active one. Also after you click on the Add Query button there will be an open file button where you can select your saved Query Builder file (*.tsm) and it will retrieve just the sql code but you have to save the file first.