Re: curly braces to group outer joins in queries from - Mailing list pgsql-sql

From Palle Girgensohn
Subject Re: curly braces to group outer joins in queries from
Date
Msg-id 40060000.1068567321@rambutan.pingpong.net
Whole thread Raw
In response to Re: curly braces to group outer joins in queries from OpenOffice.org?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: curly braces to group outer joins in queries from OpenOffice.org?
List pgsql-sql
What about the `OJ'?

FROM ( OJ table alias left join table2 alias2 )

OJ seems plain wrong, right?

Here's their code snippet (from 
oo_1.1_src/dbaccess/source/ui/querydesign/QueryDesignView.cxx):

if(aJoin.getLength())
{::rtl::OUString aStr = ::rtl::OUString::createFromAscii("{ OJ ");aStr += aJoin;aStr +=
::rtl::OUString::createFromAscii("},");aTableListStr += aStr;
 
}

You mean simple parathesis, no `OJ' would be OK?

like:

@@ -1141,9 +1141,9 @@
if(aJoin.getLength()){
-    ::rtl::OUString aStr = ::rtl::OUString::createFromAscii("{ OJ ");
+    ::rtl::OUString aStr = ::rtl::OUString::createFromAscii("( ");    aStr += aJoin;
-    aStr += ::rtl::OUString::createFromAscii(" },");
+    aStr += ::rtl::OUString::createFromAscii(" ),");    aTableListStr += aStr;}


Thanks for the prompt reply, as usual!

Regards,
Palle

--On tisdag, november 11, 2003 09.39.52 -0500 Tom Lane <tgl@sss.pgh.pa.us> 
wrote:

> Palle Girgensohn <girgen@pingpong.net> writes:
>> I just tried using openoffice to create a SQL query, but it failed when
>> I  tried using left outer joins. The contructed query from OO contains
>> curly  braces to group things. I've never seen this construct before.
>
> The SQL standard has never heard of it, either.  Parentheses would be
> correct here.
>
>             regards, tom lane






pgsql-sql by date:

Previous
From: Christoph Haller
Date:
Subject: Re: How to know column constraints via system catalog tables
Next
From: Tom Lane
Date:
Subject: Re: curly braces to group outer joins in queries from OpenOffice.org?