AnsweredAssumed Answered

EXCECUTE SQL INSERT multiple records into FileMaker via ODBC 

Question asked by Hans on Jan 26, 2018
Latest reply on Jan 28, 2018 by beverly

Is it possible to create multiple records in FileMaker using ODBC and only one SQL-statement?

 

I can create a record in one FileMaker database from another FileMaker database using ODBC and the EXCECUTE SQL -script using this Sql-statement:

 

INSERT INTO DWH (CustomerName, TypeRecord)

   VALUES ('Peter', 'Forecast')

 

This creates one record in the table DWH with Peter in the field CustomerName and Forecast in the field TypeRecord.

This works fine.

 

But is it possible to send more records in the same SQL-statment to avoid opening and closing the connection eact time and then make it faster?

Remember I'm "sending" from FileMaker to FileMaker.

 

I have tried multiple combinations without success like

 

A: (with no success)

INSERT INTO DWH (CustomerName, TypeRecord)

   VALUES ('Peter', 'Forecast'), ('Ole', 'Forecast')

 

B: (with no success)

INSERT INTO DWH (CustomerName, TypeRecord)

   VALUES ('Peter', 'Forecast'); ('Ole', 'Forecast')

 

C: (with no success)

INSERT INTO DWH (CustomerName, TypeRecord)

   VALUES ('Peter', 'Forecast'),

   VALUES ('Ole', 'Forecast')

 

And various other combinations.

 

I'm using DataDirect ODBC to connect

 

What should be the syntax if it is even possible?

I know this can be done using plugins but would like to ask here at first.

Outcomes