On Thu, 20 Feb 2003, Jeff Zucker wrote: > Francois Desarmenien wrote: > > >On Thu, 20 Feb 2003 14:44:02 -0500 > >"Jose Blanco" <[EMAIL PROTECTED]> wrote: > > > >>Any ideas why SQL statements like this one: > >> > >>SELECT collid FROM Collection where collid= '123' and (userid = 'JoseA' or > >>userid = 'JoseB') > >> > >>Are not working with SQL::Statement version 1.005, but are with version > >>0.1021? Is this another bug with this release. > >> > > I'll investigate and let you know. > > >Bug or not, it is dartabase dependend and you should double quote "Collection". > >It's the safe portable way when mixing uppercases and lowercases in table > >names (or columns). > > > > That is incorrect. The undelimited table name Collection matches an > undelimited table of that name in any case (e.g. COLLECTION, collection, > Collection). And delimiting the table name is not a portable way to > match it to an undelimited name. There is no database independent way to > match a delimited identifier to an undelimited identifier. The ANSI > standard specifies that a delimited identifier is equal only to an > *upper case* non-delimited identifier thus "Collection" matches only > COLLECTION and "Collection", not Collection in the standard. In
I am confused. IIRC, SQL-99 (I don't have a 92 ref) says that delimited identifiers are case sensitive so "Collection" only matches "Collection"; however, "COLLECTION" will match Collection (collection COLLECTION) because each character of the regular identifier Collection is replaced with its upper case equivalent before being compaired with the delimited identifier "COLLECTION". -r
