Red Gate forums :: View topic - Cross database insert breaks auto-complete
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Prompt 6
SQL Prompt 6 forum

Cross database insert breaks auto-complete

Search in SQL Prompt 6 forum
Post new topic   Reply to topic
Jump to:  
Author Message
StormRider



Joined: 10 Nov 2011
Posts: 14

PostPosted: Thu Oct 24, 2013 7:20 pm    Post subject: Cross database insert breaks auto-complete Reply with quote

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
Back to top
View user's profile Send private message
Anu Deshpande



Joined: 20 Apr 2009
Posts: 692
Location: Cambridge

PostPosted: Mon Oct 28, 2013 2:05 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Send e-mail
KevinGreiner



Joined: 05 Mar 2012
Posts: 21
Location: United States

PostPosted: Thu Oct 31, 2013 3:28 pm    Post subject: Reply with quote

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   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]
Back to top
View user's profile Send private message
Aaron Law



Joined: 28 Jun 2013
Posts: 249
Location: Red Gate Software

PostPosted: Fri Nov 01, 2013 4:02 pm    Post subject: Reply with quote

Hi Kevin,
Could you tell me if this build fixes the issue for you http://download.red-gate.com/EAP/SQLPrompt/SQLPrompt_6.1.0.82.exe ?

Thanks!
Back to top
View user's profile Send private message
KevinGreiner



Joined: 05 Mar 2012
Posts: 21
Location: United States

PostPosted: Tue Nov 05, 2013 2:07 pm    Post subject: Reply with quote

Yes, this build appears to fix the problem. Thanks so much!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group