Subject Re: Firebird and ODBC
Author Michael Vilhelmsen
NOW I got you.

Thank you very much.

Michael


--- In firebird-support@yahoogroups.com, "Fidel Viegas"
<fidel.viegas@...> wrote:
>
> On Feb 6, 2008 9:27 AM, Michael Vilhelmsen
> <Michael.Vilhelmsen@...> wrote:
>
> > Hm - Maybe
> >
> > If I read it correctly you just confirm, what I said.
> > That is the SQL send from this other application is not valid to
Firebird.
> >
> > I Believe they send it like this:
> >
> > select * from [DWICountry]
> >
> > Where it should be
> >
> > select * from DWICountry
> >
> > At least I have never used those [] with any SQL written to Firebird.
> > But I have used them with a MS SQL Server.
> > And I know, that those people that has made this other appl. among
> > others uses a MS SQL Server.
> >
> > But thx so far.
> >
> > Ill contact this other company now.
> >
> > Michael
>
> Yes, that is correct. I was just trying to explain to you the
> difference between MS SQL Server and Firebird. The [] are delimiters
> for MS SQL Server identifiers. In Firebird the equivalent is "". But,
> you should never have to use them, unless you have, for instance, a
> keyword conflict. In that case, you declare your identifier delimited
> between ""
>
> if your table was created using the following sql:
>
> create table DWICountry (column1, column2, etc...), then you can write
> your selects in two ways:
>
> Without delimiters:
>
> 1) select * from DWICountry
> 2) select * from dwicountry
> 3) select * from DWiCounTrY
>
> which is case insensitive. All of the above will work.
>
> Or, you can use delimiters and query it like this:
>
> select * from "DWICOUNTRY"
>
> Firebird stores the identifiers internally in uppercase, so if you do
> use the delimiters, then you have to uppercase your identifiers.
>
> Now, if you do something like this:
>
> create table "DWICountry" (column1, column2, column3, etc...), then
> Firebird will store it exactly like that, and you have to use the
> delimiters all the time. That is:
>
> select * from "DWICountry"
>
> if you try:
>
> select * from "dwCounTry" or select * from "dwcountry", this will
not work.
>
> In MS SQL Server, you replace the "" with [ and ]
>
> All the best,
>
> Fidel.
>