Cross database insert breaks auto-complete

StormRiderStormRider Posts: 26
edited November 5, 2013 8:07AM in SQL Prompt
insert into [AnotherDB].dbo.summarytable
select * from SaleOrder so inner join SaleOrderDetail sod on ...

at this point SQLPrompt is unable to generate suggestions for the join condition, nor is it able to generate suggestions for the select fields.


cross database selects work just fine:
select * from [AnotherDB].dbo.summarytable s inner join SaleOrder so on ...

This generates a s.SaleOrderID = so.SaleOrderID suggestion.

SQL Prompt 6.1.0.72

Comments

  • Anu DAnu D Posts: 876 Silver 3
    Thanks for your post. We have logged a support ticket for you and I will email you shortly.
    Anuradha Deshpande
    Product Support
    Redgate Software Ltd.
    E-mail: support@red-gate.com
  • I'm seeing a similar problem with a cross database SELECT. Expanding "SELECT a.*" with tab produces a list of fields that are completely unrelated to any joined tables. Expanding "SELECT *" works as expected. I did "refresh suggestion" to make sure I wasn't use a stale cache.

    Object names are modified....
    SELECT   Ref.[AP21].[AP_DRG],
            Ref.[AP21].[AP_DRG Desc],
            Ref.[AP21].AP_MSC,
            Ref.[AP21].[AP_MDC DESC],
            Ref.[AP21].ID
    FROM    B.[qCalc] a
    LEFT JOIN Dev_SafeCopy.B.[qCalc] b
        ON a.[ICODE] = b.[ICODE]
            AND a.[CPAY] = b.[CPAY]
            AND a.[MAJOR] = b.[MAJOR]
    
  • Aaron LAaron L Posts: 596 New member
    Hi Kevin,
    Could you tell me if this build fixes the issue for you http://download.red-gate.com/EAP/SQLPro ... 1.0.82.exe ?

    Thanks!
  • Yes, this build appears to fix the problem. Thanks so much!
Sign In or Register to comment.