Subject | Re: Table references in SQL queries |
---|---|
Author | cedric_maucourt |
Post date | 2005-10-13T13:12:59Z |
--- In firebird-support@yahoogroups.com, "Adam" <s3057043@y...> wrote:
use the quotations to refer to it, so I would need to change the
queries. Moreover the queries have to stay compatible with DB2 and
DB2 doesn't accept these quotes in the queries.
of database aliases in DB2 and that's why we prefix table names with
an alias name. But with MySQL you can prefix table names with the
database name they belong too and that's not possible with Firebird.
I was just looking for an other solution.
For example, I'm currently trying to use HSQLDB and with HSQLDB I can
create schemas. When you create a table inside a schema, you can
refer to this table with "shema_name.table_name". So that's a
solution. However Firebird doesn't seem to support schemas. I'm just
looking for this kind of trick with Firebird...
>order to
> --- In firebird-support@yahoogroups.com, "cedric_maucourt"
> <cedric.maucourt1@m...> wrote:
> >
> > Hello,
> >
> > First I apologize for my poor english... :)
> >
> > I would like to use the embedded version of Firebird server in
> > do an application migration from WSAD/DB2 to Tomcat/free databaseto
> > server. Firebird seems to work fairly well but I encountered a
> > problem : all the SQL queries in the application to migrate refer
> > tables with the syntax "database_name.table_name".queries
> > Here's an example : INSERT INTO AFDZAC.FDZQTA01
> > (CODE_LDP,CODE_REG,EXPR_LCDV) VALUES ...
> > The problem is that for different reasons we cannot change the
> > and Firebird seems to reject this syntax and accepts just thename of
> > the table. This syntax works on DB2 (and MySQL too) and I wonderif
> > there is a way to force Firebird to accept it too.I thought to this solution too but just like you said I would need to
>
> No
>
> If you quoted the table names, you could probably create a table
> called "AFDZAC.FDZQTA01", but then you would need to use the
> quotations to refer to it.
use the quotations to refer to it, so I would need to change the
queries. Moreover the queries have to stay compatible with DB2 and
DB2 doesn't accept these quotes in the queries.
> >With aliases?assuming
>
> Well if you could use table name aliases (which is what I am
> you mean), then it would be just as easy to change the queries.Sorry I didn't mean table name aliases. Actually there is a concept
of database aliases in DB2 and that's why we prefix table names with
an alias name. But with MySQL you can prefix table names with the
database name they belong too and that's not possible with Firebird.
I was just looking for an other solution.
For example, I'm currently trying to use HSQLDB and with HSQLDB I can
create schemas. When you create a table inside a schema, you can
refer to this table with "shema_name.table_name". So that's a
solution. However Firebird doesn't seem to support schemas. I'm just
looking for this kind of trick with Firebird...