Re: Re: db2 related question

"Fernando" <[email protected]>
Newsgroups gmane.comp.python.egenix.user
Message-ID <[email protected]>
On Feb 25, 2010 09:52 "M.-A. Lemburg" <[email protected]> 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


_______________________________________________________________________
eGenix.com User Mailing List                     http://www.egenix.com/
https://www.egenix.com/mailman/listinfo/egenix-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.