escaping functions in a select list?
Posted in 2000
We are migrating an 5.10 database to IDS2000. Unfortunately one of the
tables in this database is called "user". At Informix 6, "user" became a
function in a select list. So now our application fails when it issues SQL
like:
select user.* from user where ...
Instead of a return of all columns in user, a single column with the app's
login is returned. However, if we spell out each column it works. i.e.
select user.user_phone, user.user_name, user... from user where ...
It seems like we have a defect in that user.<column_id> is interpreted as a
column while user.* is interpreted simply as the "user" function.
Using an alias for user works around this problem, however, the application
actually computes SQL dynamically from metadata about the schema. Altering
the code to catch function keywords and substituting aliases in the select
list, from list where clause, group clause and order clause get very
complicated.
Is there as a method to simply escape a function in the select list? Sorth
like backslash in a shell command. i.e.
select \\user.* from user ...
--
Philip Walden 5301 Stevens Creek Blvd, MS 54L-GF
Agilent Technologies Santa Clara, CA 95054
Engineering Services (408) 553-7745 FAX (408) 553-7659
mailto:phil_walden@agilent.com http://es.corporate.agilent.com/~pwalden