I'm using Heidi SQL and I keep getting this error. I want to create a trigger to update the attributes of the project table with those inserted into the histproject table AFTER INSERT. Here's the code:
DROP TRIGGER IF EXISTS setProjectAttributes;
CREATE TRIGGER setProjectAttributes
ON histproject
AFTER INSERT
AS
BEGIN
INSERT INTO project(
ProjectID,
ProjectName,
State,
Age,
TotalDays,
ProjectStatusID,
MRRStartDate,
PreConversionSetupDate,
InitialConversionDate,
ContractDate,
DueDate,
KickoffCallDate,
TargetGoLiveDate,
GoLiveSignoffDate,
SupportTurnoverDate,
HardGoLive,
AgeSinceGoLive,
DataRecievedDate,
LegacyBillingVendor,
IntialAACount)
SELECT
ProjectID,
ProjectName,
State,
Age,
TotalDays,
ProjectStatusID,
MRRStartDate,
PreConversionSetupDate,
InitialConversionDate,
ContractDate,
DueDate,
KickoffCallDate,
TargetGoLiveDate,
GoLiveSignoffDate,
SupportTurnoverDate,
HardGoLive,
AgeSinceGoLive,
DataRecievedDate,
LegacyBillingVendor,
IntialAACount
FROM
histproject;
END
All of the attributes listed are apart of both tables, and I just want to do a simple insert.