Link to home
Start Free TrialLog in
Avatar of JRockFL
JRockFLFlag for United States of America

asked on

Adding date/time column to audit table

I just added a column called AuditDate with a default value of GetDate()
and now I get this message.

Column name or number of supplied values does not match table definition.

ALTER TRIGGER [dbo].[OrdersInsertUpdate]
ON [dbo].[Orders]
AFTER INSERT, UPDATE
AS
BEGIN
      SET NOCOUNT ON;
      INSERT INTO OrdersAudit SELECT * FROM INSERTED
END

How can I correct this?
ASKER CERTIFIED SOLUTION
Avatar of ProjectChampion
ProjectChampion
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JRockFL

ASKER

Thank you