Bug with Output clause in latest beta

JimFJimF Posts: 49 Bronze 3
edited August 26, 2014 5:54AM in SQL Prompt
Enter the following snip of code into SSMS.
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...
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

Comments

  • Aaron LAaron L Posts: 596 New member
    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.
  • JimFJimF Posts: 49 Bronze 3
    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
  • Aaron LAaron L Posts: 596 New member
    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.
Sign In or Register to comment.