[egenix-users] db2 related question

Fernando fernando at cmartins.nl
Thu Feb 25 10:49:26 CET 2010


On Feb 25, 2010 09:52 "M.-A. Lemburg" <mal at egenix.com> wrote:

> mxODBC itself does not parse the SQL you pass to it. The ODBC driver
> and/or database do such parsing and thus it's possible that the ODBC
> driver can implement such conversion between mixed case and all upper
> case identifiers.
> 
> However, I wonder why that's a problem in your case:
> 
> DB2 adheres to the SQL standard which mandates to be case insensitive
> regarding identifiers, unless those identifiers are quoted.
> 
> 
> 
Thanks for your detailed answer. DB2-ExpressC doesn't seem to be
compliant, though.

I have this test table in DB2: lktBuildings(BUILDINGID, BuildCode)

Using MS Access SQL PassThrough, SQL statements are tunnelled through
ODBC without SQL parsing. If I send

SELECT "lktBuildings".BUILDINGID, "lktBuildings"."BuildCode"
FROM "lktBuildings";

it works fine, but if I send

SELECT "lktBuildings".BUILDINGID, "lktBuildings".BuildCode
FROM "lktBuildings";

(no quotes around BuildCode), I get the error

[IBM][CLI Driver][DB2/LINUXX8664] SQL0206N "lktBuildings.BUILDCODE" is
not valid in the context where it is used. SQLSTATE=42703 (#-206)

And the documentation states that "For a SELECT or DELETE statement, the
specified column is not a column of any of the tables or views
identified in a FROM clause in the statement."

I'll check the links you provided, thanks,

Fernando
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman-archives/egenix-users/attachments/20100225/9337008a/attachment.htm


More information about the egenix-users mailing list