 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
andrewp
Joined: 02 Oct 2008 Posts: 2 Country: United Kingdom |
|
Oracle Synonyms |
|
Oracle 10g in Allround Automations PL/SQL Developer.
Is there any way to get prompts for column names when using synonyms in a query?
|
|
Thu Oct 02, 2008 3:30 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Yes. You can modify the query for columns on the DB Options tab in DB Queries section, pick the query specific for Oracle "Columns (Oracle)" and make that query lookup both table names and synonyms. Basically in the WHERE clause change
where owner = :SCHEMA_NAME and table_name = :OBJECT_NAME
to
where owner = :SCHEMA_NAME and table_name in (select :OBJECT_NAME FROM dual UNION SELECT table_name from all_synonyms where owner in (:SCHEMA_NAME,decode(user,:SCHEMA_NAME,'PUBLIC','')) and instr(synonym_name,'/') = 0))
The above is just an idea for the change you need. I haven't' tested it. Please test the new query before updating SQL Assistant options.
|
|
Thu Oct 02, 2008 9:42 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|