Re: ODBC limitation??

From: Martin Gainty <mgainty(at)hotmail(dot)com>
To: <aklaver(at)comcast(dot)net>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>, <carl(dot)sopchak(at)cegis123(dot)com>
Subject: Re: ODBC limitation??
Date: 2009-03-15 03:08:17
Message-ID: BLU142-W128564545317B31F260873AE9A0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I would see if you could trim down the statement and keep the statement all on one
line (if possible)
if you cant trim it down try putting the logic in a function

HTH
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.

> From: aklaver(at)comcast(dot)net
> To: pgsql-general(at)postgresql(dot)org; carl(dot)sopchak(at)cegis123(dot)com
> Subject: Re: [GENERAL] ODBC limitation??
> Date: Sat, 14 Mar 2009 18:36:51 -0700
>
> On Saturday 14 March 2009 5:40:40 pm Carl Sopchak wrote:
> > When I run the following query through psql, it executes successfully.
> > However, when I run it through ODBC (via OpenOffice Base), I get the error
> >
> > SQL Status: HY000
> > Error code: 1000
> >
> > syntax error, unexpected $end, expecting BETWEEN or IN or SQL_TOKEN_LIKE
> >
> > Is this some limitation of ODBC? (I don't think so, so I'm going to ask on
> > the OpenOffice lists, but thought I'd check here, too...)
> >
> > Query:
> >
> > select number_of_years,
> > max(case when trial_id = 1 then period_results else null end) as
> > MaxResults1, min(case when trial_id = 1 then period_results else null end)
> > as MaxResults1, max(case when trial_id = 2 then period_results else null
> > end) as MaxResults2, min(case when trial_id = 2 then period_results else
> > null end) as MaxResults2 from trial_results
> > where trial_id in (1,2)
> > group by number_of_years
> > order by number_of_years;
> >
> >
> > This is on Linux, Fedora 8, using PostgreSQL 8.3.6 and unixODBC...
> >
> > Thanks for the help,
> >
> > Carl
>
> This is an OO problem, at some point OO Base translates ODBC and JDBC queries
> into its native SDBC format and it has some parser limitations. To get this to
> run you will have to turn of the query builder and just run it as a pass
> through query.
>
> --
> Adrian Klaver
> aklaver(at)comcast(dot)net
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

_________________________________________________________________
Hotmail® is up to 70% faster. Now good news travels really fast.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_032009

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message ataherster 2009-03-15 06:17:01 [ask] Return Query
Previous Message Adrian Klaver 2009-03-15 01:36:51 Re: ODBC limitation??