How to perform multiple row SQL insert to a Linked Oracle Database record using DLLImport
Hi, we are trying to run a dynamically generated Oracle Insert SQL script using Do $SYSTEM.SQL.DDLImport("Oracle",""," sql.txt",[Error Log]) to insert multiple rows into a Linked Table within HealthConnect to an Oracle database.
We have tried using statements that are accepted within Oracle but not when using Intersystems DLL along the lines of :
INSERT INTO mytable (column1, column2, column_n)
SELECT expr1, expr2, expr_n FROM Dual UNION ALL
SELECT expr1, expr2, expr_n FROM Dual;
SELECT mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n)
INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n)
INTO mytable (column1, column2, column_n) VALUES (expr1, expr2, expr_n)
SELECT * FROM Dual;
However, this produces error since Dual is not a recognised table.
We would prefer not to use multiple INSERT statements due to the overheads of running what would be a large number of records.
Is there a recommended solution to achieve this? Many thanks