You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by "CONSULTORIA.EDN@telefonica.net" <CO...@telefonica.net> on 2004/03/10 12:11:15 UTC
Inner Join and Informix
Hi,
I'm building an application with Informix 7.25 and RedHat 9.0
I have 2 tables : ventas and articulos, and I need make a ReportQuery
that execute a similar SQL to "select sum(ventas) from ventas inner
join articulos on ventas.idarticulo = articulos.id group by
ventas.idarticulo".
I see in the log4j that the SQL is correct, but Informix fire a "Syntax
Error" Exception. The correct syntax for Informix is similar to "select
sum(ventas) from ventas, articulos where ventas.idarticulo =
articulos.id"
Any idea ?
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org
Re: Inner Join and Informix
Posted by Jakob Braeuchi <jb...@gmx.ch>.
hi ?
looks like informix does not like the sql92 syntax for joining.
btw. p6spy is better suited to log the sqls.
jakob
CONSULTORIA.EDN@telefonica.net wrote:
> Hi,
> I'm building an application with Informix 7.25 and RedHat 9.0
> I have 2 tables : ventas and articulos, and I need make a ReportQuery
> that execute a similar SQL to "select sum(ventas) from ventas inner
> join articulos on ventas.idarticulo = articulos.id group by
> ventas.idarticulo".
>
> I see in the log4j that the SQL is correct, but Informix fire a "Syntax
> Error" Exception. The correct syntax for Informix is similar to "select
> sum(ventas) from ventas, articulos where ventas.idarticulo =
> articulos.id"
>
>
> Any idea ?
>
> Thanks.
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org