Board index » delphi » Multiple INSERT statements in a query

Multiple INSERT statements in a query

When I execute a query with the follow statements I get the error
message

General SQL error
Character found after end of SQL statement.

If I remove the semicolons I get the error message

General SQL error
Missing semicolon (;) at end of SQL statement

What is the correct syntax for multiple inserts to different tables?

INSERT INTO InsuranceDetails (CareHomeRef) values (:ref);
INSERT INTO FinancialDetails (CareHomeRef) values (:ref);
INSERT INTO RentReview (CareHomeRef) values (:ref);

 

Re:Multiple INSERT statements in a query


When I execute a query with the follow statements I get the error
message

General SQL error
Character found after end of SQL statement.

If I remove the semicolons I get the error message

General SQL error
Missing semicolon (;) at end of SQL statement

What is the correct syntax for multiple inserts to different tables?

INSERT INTO InsuranceDetails (CareHomeRef) values (:ref);
INSERT INTO FinancialDetails (CareHomeRef) values (:ref);
INSERT INTO RentReview (CareHomeRef) values (:ref);

Other Threads