MySQL Forums
Forum List  »  Newbie

Error Code: 1054. Unknown Column '<column name>' in 'file list'
Posted by: kevin hogan
Date: February 02, 2012 12:21PM

I created a table (policybilltransactions) and attempted to add values via an INSERT statement, but receive the error "Error Code: 1054. Unknown column 'InstallPremium' in 'field list'".

I then used the option to edit the table, and after entering all of the values in in column, the same error occurs when I click the "Apply" button.

This is the query generated:
[
INSERT INTO `gnydirectbill`.`policybilltransactions` (`PolicyNumber`, `EndorsementNumber`, `TransEffDate`, `TransCode`, `TransSubSystem`, `TransDescription`, `DueDate`, `TotalDue`, `Surcharge`, `InstallPremium`, `InterestCharge`, `Commission`, `PaidAmount`) VALUES ('1106D00737', 0, '2011-02-10', '20', 'P', 'Renewal Premium', '2011-02-15', 3839.35, 5.00, 0.00, 671.88, 0.00, 3844.35);
]

This is the error:
[
ERROR 1054: Unknown column 'InstallPremium' in 'field list'

SQL Statement:

INSERT INTO `gnydirectbill`.`policybilltransactions` (`PolicyNumber`, `EndorsementNumber`, `TransEffDate`, `TransCode`, `TransSubSystem`, `TransDescription`, `DueDate`, `TotalDue`, `Surcharge`, `InstallPremium`, `InterestCharge`, `Commission`, `PaidAmount`) VALUES ('1106D00737', 0, '2011-02-10', '20', 'P', 'Renewal Premium', '2011-02-15', 3839.35, 5.00, 0.00, 671.88, 0.00, 3844.35)
]

Here is the generated statements to create the table:
[
delimiter $$

CREATE
DEFINER=`root`@`localhost`
TRIGGER `gnydirectbill`.`PolicyBillTransactions_ins`
BEFORE INSERT ON `gnydirectbill`.`policybilltransactions`
FOR EACH ROW
SET NEW.AmountDue := ifnull((`InstallPremium`+`Surcharge`+`InterestCharge`),0)
$$

CREATE
DEFINER=`root`@`localhost`
TRIGGER `gnydirectbill`.`PolicyBillTransactions_upd`
BEFORE UPDATE ON `gnydirectbill`.`policybilltransactions`
FOR EACH ROW
SET NEW.AmountDue := ifnull((`InstallPremium`+`Surcharge`+`InterestCharge`),0)
$$

CREATE TABLE `policybilltransactions` (
`PolicyNumber` varchar(10) NOT NULL,
`EndorsementNumber` int(11) NOT NULL,
`TransEffDate` date NOT NULL,
`TransCode` varchar(2) NOT NULL,
`TransSubSystem` varchar(1) DEFAULT NULL,
`TransDescription` varchar(150) DEFAULT NULL,
`DueDate` date NOT NULL,
`TotalDue` decimal(18,2) DEFAULT NULL,
`Surcharge` decimal(8,2) DEFAULT NULL,
`InstallPremium` decimal(18,2) DEFAULT NULL,
`InterestCharge` decimal(5,2) DEFAULT NULL,
`Commission` decimal(18,2) DEFAULT NULL,
`PaidAmount` decimal(18,2) DEFAULT NULL,
`AmountDue` decimal(18,2) DEFAULT NULL,
PRIMARY KEY (`PolicyNumber`,`EndorsementNumber`,`TransEffDate`,`TransCode`,`DueDate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8$$
]

I installed MYSql yesterday via the MYSQL INSTALLER FOR WINDOWS and am using the Workbench, version 5.2.37CD revision 8576 on a Windows 7 platform.

As you can see I am truly a newbie and any assitance would be greatly appreciated.

Thanks.

Options: ReplyQuote


Subject
Written By
Posted
Error Code: 1054. Unknown Column '<column name>' in 'file list'
February 02, 2012 12:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.