How can we help you today? How can we help you today?

BUG: incorrect alias attempt

IF EXISTS ( SELECT  c.name as column_name
                FROM    sys.schemas s
                        JOIN sys.tables t ON s.schema_id = t.schema_id
                        JOIN sys.columns c ON t.object_id = c.object_id
                WHERE   t.object_id = @parent_table_object_id
                EXCEPT
                SELECT  x.column_name
                FROM    ( VALUES 
                                  (N'column_name') ) AS x(column_name) )
    BEGIN
        -- Columns have been added to the base table since this trigger code was developed.
        -- A developer must regenerate this code using audit.setup_after_delete_audit_trigger
        -- and update this trigger.
        THROW 50000, 'Column-list mismatch occurred inside audit-trigger.', 1;
    END;

Code above causes SQL Prompt to fail formatting. It attempts to change this:

x(column_name)

to this:

x(x.column_name)
opc.three
0

Comments

2 comments

  • Aaron L
    Hi opc.three,

    Which version of SQL Prompt are you currently using? I think this has already been fixed in the latest version (7.1.0.315). Could you try upgrading to see if that helps?

    Thanks,
    Aaron.
    Aaron L
    0
  • opc.three
    Indeed it was. I was on build 300. Build 315 has the fix. Thanks.
    opc.three
    0

Add comment

Please sign in to leave a comment.