On Tuesday 07 February 2006 01:04 pm, you wrote:
> On Tue, 2006-02-07 at 12:06 +0700, Budi Rianto wrote:
> > Hi All,
> >
> > I currently using OOo 2.0 with postgresql-sdbc-0.7.0.zip database driver.
> > The problem, everytime I try to combine fields using standard 'II'
> > operator, I got the error messages,
> > 'Syntax error in SQL Expression - parse error, expecting 'BETWEEN' or
> > 'IN' or 'SQL_TOKEN_LIKE''
> >
> > I've try simple sql like 'select firstname || lastname as name from
> > table1' with error message like above. using 'Run SQL directly' gives me
> > blank result.
>
> Is the || concatenation operator standard SQL?
>
> Firstly, I also get the same result using PostgreSQL's JDBC3 driver, so
> it's not the driver.
>
> Secondly, this definitely works when passed directly to PostgreSQL using
> PgAdminIII, as it should.
>
> I would guess from this that if you write queries in OOo Base then you
> are restricted to standard SQL, or perhaps a subset of SQL. That is,
> these queries are parsed by Base and not passed through to PostgreSQL
> unchanged.
>
> Workarounds:
> 1 - create a view in your PostgreSQL database and query the view.
>
> Ross Johnson

I believe '||' is a SQL92 standard. PosgreSQL natively support it and Base 
using its native db also support it.

Thank you for the workaround, I've considered for a while. I just hope it can 
be done in OO for a nice grouping and easy editing.

Thanks,
Budi Rianto

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to