Red Gate forums :: View topic - SQL Prompt 6.3 "Select in Object Explorer" and other issues
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

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

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



Joined: 10 Jun 2010
Posts: 60
Location: Vienna, Austria

PostPosted: Fri Jan 24, 2014 9:02 am    Post subject: SQL Prompt 6.3 "Select in Object Explorer" and other issues Reply with quote

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



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

PostPosted: Fri Jan 24, 2014 10:41 am    Post subject: Reply with quote

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



Joined: 10 Jun 2010
Posts: 60
Location: Vienna, Austria

PostPosted: Fri Jan 24, 2014 10:54 am    Post subject: Reply with quote

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



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

PostPosted: Fri Jan 24, 2014 11:04 am    Post subject: Reply with quote

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

Good catch!
Back to top
View user's profile Send private message
kondrich



Joined: 10 Jun 2010
Posts: 60
Location: Vienna, Austria

PostPosted: Mon Jan 27, 2014 3:36 pm    Post subject: Reply with quote

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. Sad
_________________
Regards, Klaus
Back to top
View user's profile Send private message
Aaron Law



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

PostPosted: Mon Jan 27, 2014 4:32 pm    Post subject: Reply with quote

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



Joined: 10 Jun 2010
Posts: 60
Location: Vienna, Austria

PostPosted: Mon Jan 27, 2014 4:36 pm    Post subject: Reply with quote

Yes, 6.3.0.66 fixes the alias issue. Thank you, Aaron!
_________________
Regards, Klaus
Back to top
View user's profile Send private message
kondrich



Joined: 10 Jun 2010
Posts: 60
Location: Vienna, Austria

PostPosted: Tue Feb 04, 2014 9:41 am    Post subject: Reply with quote

Aaron,

I found two issues using 6.3 builds up to 6.3.0.102 if ssf snippet includes a trailing semicolon:
Code:
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 *
FROM dbo.Table
WHERE Column = (|;
(As always, the pipe indicates the cursor position.)
Instead of:
Code:
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 *
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
Back to top
View user's profile Send private message
Aaron Law



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

PostPosted: Tue Feb 04, 2014 12:20 pm    Post subject: Reply with quote

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 *
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/94413-sql-prompt/suggestions/2822951-automatic-semicolons which I guess would be a better solution for you?
Back to top
View user's profile Send private message
kondrich



Joined: 10 Jun 2010
Posts: 60
Location: Vienna, Austria

PostPosted: Tue Feb 04, 2014 1:12 pm    Post subject: Reply with quote

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



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

PostPosted: Fri Feb 28, 2014 11:50 am    Post subject: Reply with quote

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



Joined: 10 Jun 2010
Posts: 60
Location: Vienna, Austria

PostPosted: Fri Feb 28, 2014 1:37 pm    Post subject: Reply with quote

Oh yes. Thanks for this note and the implementation. I did not realize this yet.
_________________
Regards, Klaus
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