If you can select from this stored procedure then you can try to use this select in INSERT into.

Does the following work?

SELECT * Custom_MENS_Other.samplesp('2021-11-02','2021-11-04','H001')

See Table-Valued functions section:
https://docs.intersystems.com/ens201815/csp/docbook/Doc.View.cls?KEY=RSQ...

And INSERT with SELECT:
https://docs.intersystems.com/ens201815/csp/docbook/DocBook.UI.Page.cls?...

Hi Thanongsak.

In the <iris>/bin folder you should have different odbcgateway*.so files.

IRIS uses odbcgateway.so when it connects to 3rd party database via ODBC.

However in UNIX world, different ODBC drivers are compiled differently and they can use different driver managers -- iODBC or unixODBC.

Thus IRIS comes with several odbcgateway libraries that are suitable for different drivers.

On my IRIS 2021.1 for macOS I have:

odbcgateway.so -- default one, for iODBC driver 8-bit
odbcgatewayiw.so -- for iODBC driver manager with Unicode support
odbcgatewayur64.so -- supports 8-bit ODBC for 64-bit unixODBC

IRIS documentation covers this here (though filenames are not correct, should be odbcgateway instead of cgate)
https://docs.intersystems.com/iris20221/csp/docbook/DocBook.UI.Page.cls?...

So the question is -- what driver manager is libmaodbc.so linked against.

In any case -- Rename odbcgateway.so to odbcgatewayi.so. And then try replacing odbcgateway.so with odbcgatewayiw.so and odbcgatewayur64.so and see with which connection works.

Hi Eddie.

Does it use it's own internal SQL database or are we able to connect to our own database and which databases are certified to run against the platform?

Both.

Supported 3rd party databases are listed here:

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

Generally, please see "First looks" guides in our doc, particularly for JDBC and ODBC:

https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...