0

Not sure if this specific error has been found, but I cannot see where I have my syntax incorrect with this INSERT INTO statement:

I have split it up into Insert and Values for easier reading. This is a string that is created by VBA and then passed to the connection.

The specific error I'm getting is -2147217900 (8004e14) "Syntax Error in INSERT INTO statement"

INSERT INTO AS_Processing_2_2 (ImportDate, [Month], [Year], [Plant Name], [Plant Number], PDFReference, a_VAR_FIRSTPROCWOGSMH, a1_BPMH_FIRSTPROCWOGSMH, a2_EFF_ON_44FIRSTPROCWOGSMH, a3_FIRSTPROCWOGSMH_RANK, a4_WB_BPMH_FIRSTPROCWOGSMH, b_BPMH_BY_DEPT_REC_WOG_FIRSTPROCWOGSMH, b1_KILL_BPMH_BY_DEPT_FIRSTPROCWOGSMH, b2_EVISWOG_BPMH_BY_DEPT_FIRSTPROCWOGSMH, b3_WB_EVIS_BPMH_BY_DEPT_FIRSTPROCWOGSMH, c_PRCT_LINE_EFFCY_FIRSTPROCWOGSMH, d_VAR_GIB_HARV_EFFCY_FIRSTPROCWOGSMH, d1_LIVGIZ_HIS_LB_MH_FIRSTPROCWOGSMH, d2_LABORperLB_C__FIRSTPROCWOGSMH, d3_STAFF_per_LINE_FIRSTPROCWOGSMH, e_TOTAL_GIB_RECVR_FIRSTPROCWOGSMH, e1_LIVER_25_FIRSTPROCWOGSMH, e2_GIZ_HT_22_FIRSTPROCWOGSMH, f_NECKSALESnMMat64_FIRSTPROCWOGSMH, g_NBRLines_REC_FIRSTPROCWOGSMH, g1_EVIS NBR_FIRSTPROCWOGSMH, h_WKLY_RUNTIME_SHIFT_FIRSTPROCWOGSMH, i_TYPEPLANTSHIFTS_FIRSTPROCWOGSMH, j_GIBHARVPAY_DEPT_FIRSTPROCWOGSMH, k_LiveBirdWght_FIRSTPROCWOGSMH, k1_RangeLBW_FIRSTPROCWOGSMH)
VALUES ('7/5/2016 4:00:43 PM', '12', '15', 'EUFAUL', '3060', '2.2', '13', '290', '-0.06', '8', '290', '725', '6889', '520', '520', '99.26', '0', '0', '0', '0', '0', '0', '0', '0', '1', '2', '37.8', '-', 'NO', '4.74', '4.4 - 5.2')
1
  • Note: The field names are not of my doing Commented Jul 5, 2016 at 20:19

1 Answer 1

1

I've found what the issue was. Space found in one of the field names!

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.