What are the challenges you face when working across database platforms? Take the survey
Options

Any way to remove the "dbo." in front of join suggestions?

montekmontek Posts: 17
edited July 18, 2007 12:46PM in SQL Prompt Previous Versions
I would prefer the suggested joins NOT include dbo. in front of tables when they're in the same schema/owner. Is this possible?

Comments

  • Options
    I've looked into this and it is a bug in the software. I've notified the developers and they are hopefully going to fix this in a future version of SQL Prompt.
  • Options
    Great, thank you. I'm surprised no one else has noticed or commented about this. Unfortunately this issue is really preventing me from getting my whole team to use this product, which we purchased in advance of it being ready. The sooner, the better.
  • Options
    Can you tell me if this is slated to be fixed in the next version and when that might be released?
  • Options
    Bart ReadBart Read Posts: 997 Silver 1
    This will be fixed in the 3.5 final release. We now honour the value of the "Qualify object names" option when inserting JOIN conditions exception where columns in another database are referenced. The following SQL illustrates this:
    -- Note that these examples are for illustrative purposes
    -- only. They use AdventureWorks 2005 and won't execute because
    -- you have to qualify object names if their owner is not
    -- your default schema.
    
    USE [master]
    GO
    
    -- Working cross-database with qualify object names disabled
    
    SELECT * FROM
    [AdventureWorks]..[Product] INNER JOIN [AdventureWorks]..[BillOfMaterials]
    ON [AdventureWorks].[Production].[Product].[ProductID] = [AdventureWorks].[Production].[BillOfMaterials].[ComponentID]
    
    GO
    
    USE [AdventureWorks]
    GO
    
    --	With qualify object names disabled
    
    SELECT * FROM
    [Product] INNER JOIN [BillOfMaterials]
    ON [Product].[ProductID] = [BillOfMaterials].[ComponentID]
    
    -- With qualify object names enabled
    
    SELECT * FROM
    [Production].[Product] INNER JOIN [Production].[BillOfMaterials]
    ON [AdventureWorks].[Production].[Product].[ProductID] = [AdventureWorks].[Production].[BillOfMaterials].[ComponentID]
    

    Hope that helps.


    Thanks,
    Bart
    Bart Read
    Principal Consultant
    bartread.com Ltd
Sign In or Register to comment.