Re: SQL Syntax Error ???
Posted in 1998
rainer.von-bongartz@dil.de wrote:
>
> I'm running IDS 7.30 on HP-UX and on NT 4.0
>
> The following SQL statements execute without any error on both systems
> if i run them directly using dbaccess:
>
> create table tt (dir integer);> select DECODE(count( dir ), 2,1,0) from tt;
>
> If I use a remote connection to the databse server (i.e. SQL Editor from IECC)
> the SQL statements run ok on the NT 4.0 machine but give an SQL error on the
> HP-UX box:
>
> -- Executing selected SQL statements in Untitled.sql.
> select DECODE(count( dir ) , 2,1,0) from tt;
> -- [Informix][Dynamic Server][rvb] SQL Error (-800) : Corresponding types must
> be compatible in CASE expression.
>
> Informix support seems unable to reproduce nor to solve this problem:
> Could anyone help me at least in reproducing this on 7.30 with SQL Editor ???
>
> Thanks in advance
> Rainer von Bongartz
> rainer.von-bongartz@dil.de
> /D/I/L/ Duesseldorf Germany
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Hi Rainer,
what about the DECODE() function? I think it's neccessary to
see what's happening inside the procedure/function if you want
to reproduce the error.
On the other hand I guess that it is impossible to do the
count() aggregate function without at least the word "distinct".
Possibly you forgot this simple word while you were trying the
query by the SQL Editor.
i.e.
select decode( count(distinct dir), ... ) from tt;
If you want you can directly forward the "procedure/function"
to my mail address.
Bye
Stefan Weideneder