Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

Redirecting Output from Interactive SQL (ODBC)

Redirecting Output from Interactive SQL (ODBC)

  • Last Updated: May 12, 2026
  • 1 minute read
    • OpenAccess SDK
    • Version 8.1
    • Documentation

Interactive SQL (ODBC) can be easily used from other processes to execute SQL commands to retrieve results, using redirection to execute. This is facilitated by having Interactive SQL (ODBC) output its results and errors to stdout and stderr respectively:

  • All results, including the column names and the output values, are sent to the stdout.
  • An error in executing a query is sent to stderr.

For example, the following command executes queries from a test.sql file and sends the outputs to output.txt and errors to errors.txt:

odbcisql -c test.sql > output.txt 2> errors.txt

TitleResults for “How to create a CRG?”Also Available inAlert