Red Gate forums :: View topic - Bug with Output clause in latest beta
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

Bug with Output clause in latest beta

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



Joined: 08 Jul 2008
Posts: 20

PostPosted: Fri Aug 22, 2014 10:19 pm    Post subject: Bug with Output clause in latest beta Reply with quote

Enter the following snip of code into SSMS.
Code:
Use AdventureWorks
Go

Update  Person.Address
Set     AddressLine1 = AddressLine1
Output  Deleted.*,
        Inserted.*

Now, go to after the asterisk in "Deleted.*" and/or "Inserted.*" and press tab to expand the column names. Deleted and Inserted (if you did both) get replaced with "Address" (and not even the schema corrected name of "Person.Address").

The "-- Deleted" and "-- Inserted" comments below are mine...
Code:
Update  Person.Address
Set     AddressLine1 = AddressLine1
Output  Address.AddressID, -- Deleted
        Address.AddressLine1, -- Deleted
        Address.AddressLine2, -- Deleted
        Address.City, -- Deleted
        Address.StateProvinceID, -- Deleted
        Address.PostalCode, -- Deleted
        Address.rowguid, -- Deleted
        Address.ModifiedDate, -- Deleted
        Address.AddressID, -- Inserted
        Address.AddressLine1, -- Inserted
        Address.AddressLine2, -- Inserted
        Address.City, -- Inserted
        Address.StateProvinceID, -- Inserted
        Address.PostalCode, -- Inserted
        Address.rowguid, -- Inserted
        Address.ModifiedDate -- Inserted


Thanks,
Jim
Back to top
View user's profile Send private message
Aaron Law



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

PostPosted: Sat Aug 23, 2014 10:49 am    Post subject: Reply with quote

Thanks Jim! Smile
We’ll get a fix out for this next week. Since inserted and deleted are copies of address it’s probably got confused over what the owner qualification is meant to be.
Back to top
View user's profile Send private message
JimF



Joined: 08 Jul 2008
Posts: 20

PostPosted: Sat Aug 23, 2014 6:54 pm    Post subject: Reply with quote

Thanks Aaron,

I guess I should have phrased my OP a bit differently and just left off the part about the incorrect schema as in this case the names Inserted and Deleted need to be kept.

I hope I wasn't being too confusing there.

Jim
Back to top
View user's profile Send private message
Aaron Law



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

PostPosted: Tue Aug 26, 2014 10:54 am    Post subject: Reply with quote

Hi Jim,

This should now be fixed in 6.4.0.537 - Your first post was very clear and it was easy for us to recreate on AdventureWorks Smile
We did notice that the expand wildcards has some odd alignment after expanding the columns (I think it always has) so we'll also have a quick look into seeing if we can fix that too.

Thanks,
Aaron.
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