SQL Prompt 6.3 "Select in Object Explorer" and other issues

Provides intelligent code completion for SQL Server editors.

Moderators: Anu Deshpande, Aaron Law, David Priddle

SQL Prompt 6.3 "Select in Object Explorer" and other issues

Postby kondrich » Fri Jan 24, 2014 9:02 am

Hi Aaron,

thank you for SQL Prompt 6.3 with this awesome new feature "Select in Object Explorer". We will love it!

Here are my experiences with 6.3.0.39 (yes, I am aware that this is the first build, so no complaints, just a list of issues I encountered):

CTRL+F12 on tables, procedures, views, even their columns(!) works as expected - if the object resides on the same instance on which the script windows is opened.
CTRL+F12 (or choosing the menu option) on synonyms does nothing.
CTRL+SHIFT+F12 on synonyms correctly jumps to the synonym in Object Explorer.
CTRL+F12 on tables, procedures, views that reside on a different instance as the instance where the script windows is open (e.g. SELECT * FROM Server1.Database.owner.table) is a little bit awkward: SQL Prompt jumps to the Server Objects/Linked Servers/Server1/Catalogs/Database tree branch in Object Explorer rather than selecting the object on its hosting server instance/databse itself. Hence, no further object details are available through linked server view.

Highlighting matching parentheses is great!

I am very looking forward for this new version. Thanks!
Regards, Klaus
kondrich
 
Posts: 60
Joined: Thu Jun 10, 2010 10:44 am
Location: Vienna, Austria

Postby Aaron Law » Fri Jan 24, 2014 10:41 am

Thanks for the feedback!

For the synonyms are they located on a different instance? If they are the same instance but a different database it might help to check the option under Suggestions->Connections->Load referenced databases?

Going to the connected instance if there is one rather than the linked servers folder definitely makes sense to me. It's a little trickier to resolve than the rest but we'll look into it.
Aaron Law
 
Posts: 252
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby kondrich » Fri Jan 24, 2014 10:54 am

Hi,

load referenced databases was disabled. However, I know that it was enabled before upgrading to 6.3, since we use synonyms everywhere and we really need this.
OK, I re-enabled it.

Now it looks a little bit weird: It's working now with CTRL-F12. That's the good news, but only when writing
Code: Select all
SELECT * FROM ObjectAsSynonym|
(where the pipe should explain the cursor position) or if the object name is selected by double-clicking it.
When writing
Code: Select all
SELECT * FROM ObjectAsSynonym|;
CTRL+F12 does not jump to the object - only if its name is selected in this case. (I customized my ssf snippet to include the trailing semicolon.)
Regards, Klaus
kondrich
 
Posts: 60
Joined: Thu Jun 10, 2010 10:44 am
Location: Vienna, Austria

Postby Aaron Law » Fri Jan 24, 2014 11:04 am

Looks like we're trying to use the semicolon as the "object" to jump to which clearly isn't very useful.

Good catch!
Aaron Law
 
Posts: 252
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby kondrich » Mon Jan 27, 2014 3:36 pm

Confirming that this issue is resolved in 6.3.0.65.
However, on the way to 6.3.0.65 (maybe already during install of the initial 6.3 build), my custom aliases and prefix exclusions got deleted. :-(
Regards, Klaus
kondrich
 
Posts: 60
Joined: Thu Jun 10, 2010 10:44 am
Location: Vienna, Austria

Postby Aaron Law » Mon Jan 27, 2014 4:32 pm

Sorry about that, looks like the first 6.3 beta switched which file to store the options in (probably why your "Load referenced databases" option became unticked)

I just uploaded another build and hopefully your aliases should be back?
Aaron Law
 
Posts: 252
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby kondrich » Mon Jan 27, 2014 4:36 pm

Yes, 6.3.0.66 fixes the alias issue. Thank you, Aaron!
Regards, Klaus
kondrich
 
Posts: 60
Joined: Thu Jun 10, 2010 10:44 am
Location: Vienna, Austria

Postby kondrich » Tue Feb 04, 2014 9:41 am

Aaron,

I found two issues using 6.3 builds up to 6.3.0.102 if ssf snippet includes a trailing semicolon:
Code: Select all
SELECT *
FROM $CURSOR$;

If I open a single/double quotation mark or a parenthesis directly before the semicolon, SQL Prompt does not insert the closing one automatically. This leads to the following code:
Code: Select all
SELECT *
FROM dbo.Table
WHERE Column = (|;
(As always, the pipe indicates the cursor position.)
Instead of:
Code: Select all
SELECT *
FROM dbo.Table
WHERE Column = (|);


And if we continue our little example using a subquery and a second ssf in it, it generates:
Code: Select all
SELECT *
FROM dbo.Table
WHERE Column = (SELECT *
                           FROM |;;

Now the closing parenthesis is missing and there are two semicolons at the end of the statement.
Regards, Klaus
kondrich
 
Posts: 60
Joined: Thu Jun 10, 2010 10:44 am
Location: Vienna, Austria

Postby Aaron Law » Tue Feb 04, 2014 12:20 pm

Hi Klaus,
It looks like it's always been this way (I just gave it a go in prompt 5) I'll log a bug for the closing characters as it feels like it should be inserting one here. However with your second example I'm not sure it would help here since you'd end up with something like:

Code: Select all
SELECT *
FROM dbo.Table
WHERE Column = (SELECT *
                           FROM |;);


I'm wondering if adding semicolons to snippets might not be the best approach here. I noticed you voted on https://redgate.uservoice.com/forums/94 ... semicolons which I guess would be a better solution for you?
Aaron Law
 
Posts: 252
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby kondrich » Tue Feb 04, 2014 1:12 pm

Hi Aaron,

it would definitely be better, if SQL Prompt handled the semicolon itself. Customizing the snippets is just a (hopefully: temporary) workaround.
Regards, Klaus
kondrich
 
Posts: 60
Joined: Thu Jun 10, 2010 10:44 am
Location: Vienna, Austria

Postby Aaron Law » Fri Feb 28, 2014 11:50 am

Hi Klaus,
The latest beta (6.3.0.188) should now try to select a linked server object on a connected server rather than looking under the "Server Objects/Linked Servers" folder (although it'll fall back to this if you haven't got an open connection to that server)
Aaron Law
 
Posts: 252
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby kondrich » Fri Feb 28, 2014 1:37 pm

Oh yes. Thanks for this note and the implementation. I did not realize this yet.
Regards, Klaus
kondrich
 
Posts: 60
Joined: Thu Jun 10, 2010 10:44 am
Location: Vienna, Austria


Return to SQL Prompt 6

Who is online

Users browsing this forum: No registered users and 0 guests