SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
[SA 7.1.228 pro] Refactoring - Qualify object names

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
[SA 7.1.228 pro] Refactoring - Qualify object names
Author Message
sqltogo



Joined: 02 Jul 2014
Posts: 38
Country: Netherlands

Post [SA 7.1.228 pro] Refactoring - Qualify object names Reply with quote
Let me start with a complement, I use Qualify Objects name a lot and this version really works better and more complete.
But I found an error getting the correct schema name.
Using Management studio 2014 and SQL Server 2012 standard edition
There are a few schemas defined in the database.
Start editing and I enter this text:
EXEC sqldba.
After Control+Space SA correctly find the procedures within this schema, and the code is completed as:
EXEC sqldba.usp_GenerateDailyJobSummary
@HoursOld = NULL
Then I remove the schema prefix and use refactoring, Qualify object names.
This is the code SA produces:
EXEC dbo.usp_GenerateDailyJobSummary
@HoursOld = NULL
Which is not the correct schema name, and yes I checked, I do not have the same procedure in the dbo schema.
Mon Nov 17, 2014 6:00 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
Thank you very much for reporting this. Can you please tell me how you login to the database.
Is your login sqldba?
In there a user mapped to that login in the database hosting usp_GenerateDailyJobSummary procedure?
If yes, and yes, does the user mapping have dbo as its default schema for sqldba login?
Mon Nov 17, 2014 7:55 pm View user's profile Send private message
sqltogo



Joined: 02 Jul 2014
Posts: 38
Country: Netherlands

Post Reply with quote
I am using Windows Autentication with the default schema dbo
Alternative login in with login sa with password and default schema dbo.
In this database I use a few different schemas to separate groups of objects
It is simple to reproduce with this code example:
USE TestSQLAssist
GO
create SCHEMA mytest
GO
CREATE TABLE mytest.mytable (c1 INT)
GO
SELECT * FROM mytable AS m
go
-- Refactor, qualify object names gives this result
SELECT * FROM dbo.mytable AS m
GO
Thu Nov 20, 2014 4:50 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7948

Post Reply with quote
Thank you. I submitted a new ticket to investigate and fix this issue.
Thu Nov 20, 2014 5:12 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
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
Design by Freestyle XL / Flowers Online.