Brad Wilson wrote:
>
> Hello,
>
> Firstly, software specs:
> OS: Windows XP Pro (also occurs on Windows 2000)
> psqlodbc: 07_03_0200 (also occurs with the 10 previous versions)
> DB: postgresql 7.3 (also occurs with 7.2, not tested on others)
>
> I am having a problem when using the "CASE" function over ODBC within a
> select statement. For example,
> SELECT a.apples,
> a.bananas,
> CASE a.others
> WHEN 'orange' THEN 'citrus' ELSE 'non citrus'
> END
> FROM fruits a;
>
> This will result in about 10 retries (as per the ODBC commlog file), and
> then the final results will contain valid data in the 'apples' and
> 'bananas' columns, but no data (empty fields) in the 'case' column.
>
> Interestingly, if I modify the CASE function to return integers rather
> than strings, then it will work. Eg,
> CASE a.others
> WHEN 'orange' THEN 1 ELSE 2
> END
> Will work and return the expected results.
>
> Addendum: Some further testing has shown that statements such as the
> following will also fail with similar errors:
> SELECT substring (a.apples from 1 for 3) from fruits a;
>
> Below is a snippet of the commlog file showing the final two retries of
> a similar SELECT statement using CASE:
>
> If you require any further information, please don't hesitate to ask.
Could you send me the Mylog debug output ?
regards,
Hiroshi Inouehttp://www.geocities.jp/inocchichichi/psqlodbc/