How can we help you today? How can we help you today?

Object qualification where database name = schema name

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
sqlearner
0

Comments

2 comments

  • Aaron L
    Hi sqlearner,

    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.
    Aaron L
    0
  • sqlearner
    Thanks Aaron.

    I'll grab version 7 and give it a try.
    sqlearner
    0

Add comment

Please sign in to leave a comment.