SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Oracle Synonyms

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Oracle Synonyms
Author Message
andrewp



Joined: 02 Oct 2008
Posts: 2
Country: United Kingdom

Post Oracle Synonyms Reply with quote
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 View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6484

Post Reply with quote
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 View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.