Rexx/SQL

A Rexx interface to SQL databases

Version 2.5

15 October 2006


Frequently Asked Questions


Q: I use a database function in the column list of a SELECT statement. How do I retrieve the value of the column ?

A: Most databases have the capability for columns in a SELECT statement to be given an alias. Suppose you try to call SQLCOMMAND as:
Call SQLCommand 'q1', 'SELECT count(*) FROM MYTABLE'

Rexx/SQL will try and set the variables: Q1.COUNT(*).0 and Q1.COUNT(*).1. Clearly these variables will not be available in your Rexx program. Instead use a column alaias. There are generally two syntaxes for this. Both are shown below:
Call SQLCommand 'q1', 'SELECT count(*) AS mycount FROM MYTABLE'
Call SQLCommand 'q1', 'SELECT count(*) mycount FROM MYTABLE'

Rexx/SQL will then set the variables: Q1.MYCOUNT.0 and Q1.MYCOUNT.1.


Q: When I download Rexx/SQL binaries, or build Rexx/SQL from source I get 2 DLLs and 2 executables. Why ?

A: If you are accessing a database from a single vendor, such as Oracle, then you would usually use the external functions that start with SQL, rather than the external functions that start with ORA.
See 5. Implementation Notes for more information.
REXXSQL.DLL/librexxsql.so contains the external functions that start with SQL. REXXORA.DLL/librexxora.so contains the external functions that start with ORA.


Q: Does Rexx/SQL support MS SQL Server or MS Access?

A: Yes, the Windows ODBC port (rxsqlxx_odbc_w32.zip) supports SQL Server and Access. You can even manipulate Excel spreadsheets with Rexx/SQL.


Copyright © Mark Hessling 1997-2006 <mark@rexx.org>


Return to Table of Contents
Last updated 15 October 2006