Bug with Output clause in latest beta

Provides intelligent code completion for SQL Server editors.

Moderators: Anu Deshpande, Aaron Law, David Priddle

Bug with Output clause in latest beta

Postby JimF » Fri Aug 22, 2014 10:19 pm

Enter the following snip of code into SSMS.
Code: Select all
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: Select all
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
JimF
 
Posts: 20
Joined: Tue Jul 08, 2008 7:55 pm

Postby Aaron Law » Sat Aug 23, 2014 10:49 am

Thanks Jim! :)
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.
Aaron Law
 
Posts: 262
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software

Postby JimF » Sat Aug 23, 2014 6:54 pm

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
JimF
 
Posts: 20
Joined: Tue Jul 08, 2008 7:55 pm

Postby Aaron Law » Tue Aug 26, 2014 10:54 am

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 :)
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.
Aaron Law
 
Posts: 262
Joined: Fri Jun 28, 2013 10:56 am
Location: Red Gate Software


Return to SQL Prompt 6

Who is online

Users browsing this forum: No registered users and 0 guests