Symptom
When inserting multiple rows of data with one insert statement by simply comma separating the VALUES part of the statement, it returns an error.
INSERT INTO TEST
(Emp_ID, Dept_ID, Start_Date, End_Date)
VALUES
(111, 1, '2018-01-01 00:00:00', '9900-12-31 00:00:00'),
(222, 1, '2018-01-01 00:00:00', '9900-12-31 00:00:00'),
(333, 1, '2018-01-01 00:00:00', '2000-01-25 00:00:00'),
(444, 2, '2018-01-26 00:00:00', '9900-12-31 00:00:00'),
(555, 1, '2018-01-23 00:00:00', '9900-12-31 00:00:00');
Error)
Could not execute 'INSERT INTO TEST (Emp_ID, Dept_ID, Start_Date, End_Date) VALUES (111, 1, '2018-01-01 00:00:00', ...'
SAP DBTech JDBC: [257]: sql syntax error: incorrect syntax near ",": line 4 col 56 (at pos 125)
Image /data in this KBA is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.
Read more...
Environment
- HANA 1.0
- HANA 2.0
Product
Keywords
HANA, insert, multiple line, incorrect syntax near "," , KBA , HAN-DB , SAP HANA Database , Problem
About this page
This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).Search for additional results
Visit SAP Support Portal's SAP Notes and KBA Search.