Cross database insert breaks auto-complete

Provides intelligent code completion for SQL Server editors.

Moderators: Anu Deshpande, Aaron Law, David Priddle

Cross database insert breaks auto-complete

Postby StormRider » Thu Oct 24, 2013 7:20 pm

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
StormRider
 
Posts: 14
Joined: Thu Nov 10, 2011 2:20 am

Postby Anu Deshpande » Mon Oct 28, 2013 2:05 pm

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
Anu Deshpande
 
Posts: 692
Joined: Mon Apr 20, 2009 3:53 pm
Location: Cambridge

Postby KevinGreiner » Thu Oct 31, 2013 3:28 pm

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....

Code: Select all
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]
KevinGreiner
 
Posts: 21
Joined: Mon Mar 05, 2012 9:38 pm
Location: United States

Postby Aaron Law » Fri Nov 01, 2013 4:02 pm

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!
Aaron Law
 
Posts: 262
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby KevinGreiner » Tue Nov 05, 2013 2:07 pm

Yes, this build appears to fix the problem. Thanks so much!
KevinGreiner
 
Posts: 21
Joined: Mon Mar 05, 2012 9:38 pm
Location: United States


Return to SQL Prompt 6

Who is online

Users browsing this forum: No registered users and 1 guest