SQL Server

Saw the ODBC connector to link KDB to SQL Server, but what would be the code to select from a table in KDB and insert it in to SQL Server, and select data from a SQL Server database and insert it in to a KDB table, could not find any examples. Regards.

http://code.kx.com/q/cookbook/odbc/

Given that the connector is basically an ODBC connection. In order to query from or insert data into SQL Server, all you need to do is to construct a proper SQL statement that you can execute in SQL Server.

I second flying’s statement.

Export the data on a cron and use bcp, useless tool, to batch load in to SQL Server, saves all the hassle of ODBC connections, has been running a few days and 100% stable. Thanks for the advice.