>I know that SapDB/MaxDB databases supports mixed case
>quoted identifiers, so all identifiers in my
>application are specified between quotes and mixed
>case is used for their naming. Everything works fine,
>until a query for a table descriptions is made
>invoking getTables() from the meta data, using the
>same rule, every identifiers between quotes. It seems
>that in this case the quotes are not needed anymore,
>because specifying here a quoted identifier for the
>tableNamePattern parameter will make sure that the
>table definition is not found even if it exists. Is
>this a correct behavior? i guess it's not, please
>correct me if i'm wrong. How should my application
>know, when to use quoted identifiers and when
>should't?

Quoted identifiers are important only when using them as *idetifiers* in a SQL 
statement. When you are querying the meta data of the database, table names behave 
just like ordinary data (which means that comparisons are always case sensitive and no 
quoting is necessary except the quoting for any string literal.

Suppose you have a table MyTable:
SELECT * FROM MyTable => wrong, looks for MYTABLE
SELECT * FROM "MyTable" => OK

SELECT * FROM tables where tablename = 'MyTable' => OK
SELECT * FROM tables where tablename = '"MyTable"' => wrong, double quotes are not 
part of the name
SELECT * FROM tables =>
...|TABLENAME|...
...|MyTable|...

JDBC: metaData.getTables (null, null, 'MyTable', ...) => OK
JDBC: metaData.getTables (null, null, '"MyTable"', ...) => wrong, double quotes are 
not part of the name

Daniel Dittmar

-- 
Daniel Dittmar
SAP Labs Berlin
[EMAIL PROTECTED] 

-- 
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to