PxPlus User Forum

Main Board => Discussions => ODBC => Topic started by: Thomas Bock on February 27, 2020, 09:11:40 AM

Title: pathnames in SQL selects
Post by: Thomas Bock on February 27, 2020, 09:11:40 AM
Is there a way to use pathnames in SQL select statements when using the PxPlus ODBC driver and if not, can you add this to the wishlist please?
We use pseudo definitions in the DD, which serve as creation patterns for hundreds of files. Each of them has an iol, but none of them has an own name in the DD.
Title: Re: pathnames in SQL selects
Post by: Devon Austen on February 27, 2020, 09:59:46 AM
The table name in the SQL query must match a DD table name or a table name from a INI file. It is not possible to use a physical file path in the SQL query. Our ODBC driver uses standard SQL which requires a table name not a file path.

You will need to use the table name from the DD for the file. It is a required field so each entry in your DD has a unique name. If you don't like those names you can always define an INI file from the data dictionary entries and give them new names to be used by ODBC.

https://manual.pvxplus.com/?odbc/table_definitions/ini_definition.htm (Info about the layout of the INI used by ODBC)
https://manual.pvxplus.com/?odbc/table_definitions/generating_ini_table_definitions.htm (Info about how to programmatically generate an INI from your DD)