Subject | Re: [Firebird-general] OT Non-Firebird - braces as outer join escape sequence |
---|---|
Author | Mark Rotteveel |
Post date | 2011-04-12T07:29:06Z |
> I recently ran across this syntax. (Note {oj ...}Looks like the ODBC escape syntax to me. It is intended for language constructs that are either not formalised, or where databases sometimes have their own (historic) syntax and not standardised (SQL) syntax. The escape syntax means the driver will need to translate the escaped construct (which is also defined in ODBC) to the construct supported by the database (or in some cases: let the database handle it by itself). The idea is that this would make it easier to create database indepent code.
>
>
> SELECT Customers.CustID, Customers.Name, Orders.OrderID, Orders.Status
> FROM {oj Customers LEFT OUTER JOIN Orders ON
> Customers.CustID=Orders.CustID}
> WHERE Orders.Status='OPEN'
>
> It seems to be equivalent to
>
>
> SELECT Customers.CustID, Customers.Name, Orders.OrderID, Orders.Status
> FROM Customers LEFT OUTER JOIN Orders ON Customers.CustID=Orders.CustID
> WHERE Orders.Status='OPEN'
>
> Any idea what that's about and whether there's a difference between the
> two?
See also http://msdn.microsoft.com/en-us/library/ms711838%28v=vs.85%29.aspx
I am not sure, but it might also be specified in the SQL/CLI specs. JDBC drivers are also required to support a subset of the ODBC escape syntax btw (at least for some of the scalar functions).
--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl