Благодаря тому, что @SeanLange сказал в комментариях, я нашел решение. Я добавил три дополнительных столбца, не являющихся частью таблицы containers
, в запрос SELECT
, и, конечно же, это сработало. Я также явно назвал столбцы вместо использования селектора *
, поэтому окончательное решение выглядело так:
<cfquery name="archiveDeletion" datasource="#application.dsn#">
INSERT INTO deletedCylinderContentRecords (air_emissions, barcode, building, capacity,
Carcinogen, carcinogen_comment, carcinogen_type, cas, casORmixture, chemicalname, concentration,
containermaterial, containertype, cyanide, CylinderID, dotdivision, dothazardclass,
dothazardclassSub, expirationdate, flashpoint, formula, grade, HMAR_ID, hydroflouric_acid,
HydrostaticTestDate, HydrostaticTestDueDate, initial_quantity, inventoried, isdeleted, lastupdated,
LeakTestDate, location, manufacturer, ModifiedBy, msds, MSDS_Scan, MSN, Mutagen, nfpablue, nfpared,
nfpawater, nfpayellow, ownerid, PeroxideConcentration, PeroxideFormers, PeroxideTestDate,
PeroxideTestDueDate, phaseID, PList, price, Purchase_Scan, Purchase_Scan_Link, purchasedate,
remarks, ResearchSampleNo, room, sewer, shelf, ShockSensitive, specificgravity, spillage,
spillclass, SPInspect, SPInspectDate, SPInterval, stocknumber, StorageRemarks, Teratogen,
Undelete, units, usage_comments, usage_transferred, usage_transferred_to, usedinprocess, Validate,
ValidateBy, ValidateDate, vendor, VendorNumber, waste, deleterName, timeDeleted, reasonDeleted)
SELECT air_emissions, barcode, building, capacity, Carcinogen, carcinogen_comment, carcinogen_type,
cas, casORmixture, chemicalname, concentration, containermaterial, containertype, cyanide,
CylinderID, dotdivision, dothazardclass, dothazardclassSub, expirationdate, flashpoint, formula,
grade, HMAR_ID, hydroflouric_acid, HydrostaticTestDate, HydrostaticTestDueDate, initial_quantity,
inventoried, isdeleted, lastupdated, LeakTestDate, location, manufacturer, ModifiedBy, msds,
MSDS_Scan, MSN, Mutagen, nfpablue, nfpared, nfpawater, nfpayellow, ownerid, PeroxideConcentration,
PeroxideFormers, PeroxideTestDate, PeroxideTestDueDate, phaseID, PList, price, Purchase_Scan,
Purchase_Scan_Link, purchasedate, remarks, ResearchSampleNo, room, sewer, shelf, ShockSensitive,
specificgravity, spillage, spillclass, SPInspect, SPInspectDate, SPInterval, stocknumber,
StorageRemarks, Teratogen, Undelete, units, usage_comments, usage_transferred, usage_transferred_to,
usedinprocess, Validate, ValidateBy, ValidateDate, vendor, VendorNumber, waste,
<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#getDeleterName.last_name#, #getDeleterName.first_name# #getDeleterName.middle_initial#.">,
SYSDATETIME(),
<cfqueryparam cfsqltype="CF_SQL_VARCHAR" value="#Form.deleteReason5#">
FROM containers WHERE barcode = '#session.barcode#'
</cfquery>