You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by c....@ads.it on 2006/11/17 15:46:09 UTC
RE: select list: expression values !
"Randy Layman" <Ra...@vocalocity.com> scritti il 17/11/2006 15:39:24
>
> I think your problem might be that your SQL doesn't have a
> result column ELEMENTO. I believe you should change your SQL to:
> select
> TIPO_RIGA_ID, ELEMENTO - 1 AS ELEMENTO, NOME, TIPO_ELEMENTO_ID
> from TIPI_DATO_RIGA
> where tipo_dato_id = #id:INTEGER#
> so that the result set contains the correct column name in the meta data.
>
> Randy
"Jeff Butler" <je...@gmail.com> scritti il 17/11/2006 15:40:21
> You might need to do this:
>
> select elemento - 1 as elemento, ...
>
> sometimes databases rename these calculated columns.
>
> If you run the query in the Squirrel SQL client you can see exactly
> what's happening.
>
> Jeff Butler
Thanks Randy
Thanks Jeff
The select elemento - 1 as elemento tecnique works out the problem!
:)