Toad World® Forums

How to use DB Search path (cross schema queries)

My problem :
I have to work on a lot of “old” code where tables were not fully qualified with schema.table. and i am looking for a way to still work in TDA but TDA seems to only want to work with one schema at a time or you must fully qualified your tables.

Is there some way to clear the Schema in the editor tool bar?

Right now I have found 2 work-arounds

  1. if i build the Connection and delete the “database” field it will work till set the schema and then i must disconnect and reconnect to clear the schema
  2. add as my first line of code
    SET search_path= XXXXXXXX, XXXX, XXXX ;
    select …
    from …
    where …

but #2 only works for each run
if i am highlighting just a section code to run this is no longer an option