Object qualification where database name = schema name
sqlearner
Posts: 3
Using SQL Prompt 6.5.0.336, we have inherited a database where one of the schemas has the same name as the database itself. Our internal style requires table names to be qualified by schema name without database name.
When auto-completing a table name using our insertion key, SQL prompt inserts the schema and object name again such that the object is qualified as database_name.schema_name.object_name. This auto-insertion then breaks our style. Is there any way to configure SQL prompt that might avoid this behaviour? The obvious work-around is to not auto-complete, but the habit is difficult to break.
Any suggestions?
Example:
Database = 'Tools'
Schema name = 'Tools'
Table/Object name = 'Parts'
Desired: SELECT * FROM Tools.Parts
SQL Prompt Auto Complete Entry: SELECT * FROM Tools.Tools.Parts
When auto-completing a table name using our insertion key, SQL prompt inserts the schema and object name again such that the object is qualified as database_name.schema_name.object_name. This auto-insertion then breaks our style. Is there any way to configure SQL prompt that might avoid this behaviour? The obvious work-around is to not auto-complete, but the habit is difficult to break.
Any suggestions?
Example:
Database = 'Tools'
Schema name = 'Tools'
Table/Object name = 'Parts'
Desired: SELECT * FROM Tools.Parts
SQL Prompt Auto Complete Entry: SELECT * FROM Tools.Tools.Parts
Comments
We've added a special case for when there's a database and schema with the same name in SQL Prompt 7 which you can download from our website, could you check if that solves this for you?
Thanks,
Aaron.
I'll grab version 7 and give it a try.