Toad World® Forums

Running one query on 2 connections

I have two database connections defined in TDA: one is PRE-PROD and the other is PROD. They both have the same table structure but with different data. How do I copy or reuse a query I created using the PROD database connection so that I can run it on the PREPROD database, please? It DOES not work to simply switch the database connections on the connections toolbar.

Thanks!

You can right click the title of editor and choose "Change Connection".

Another useful functionality is "group execute", you can right click the editor to enable group execute and select multiple connection to run your query.

Let me know if it helps.

You can right click the title of editor and choose "Change Connection".

Another useful functionality is "group execute", you can right click the editor to enable group execute and select multiple connection to run your query.

Let me know if it helps.

What does your SQL look like? Specifically the From clause. Try specifying your tables without fully qualifying the name. Try it with just the table name (no database.dbo etc. preceding the table name).