ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c.ze...@ads.it
Subject RE: select list: expression values !
Date Fri, 17 Nov 2006 14:46:09 GMT


"Randy Layman" <Randy.Layman@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" <jeffgbutler@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!
:)
Mime
View raw message