date
Posted in 1999
Topics: General Discussion
hi, can someone please tell me why "select * from tableName where (TODAY - last_update < 3 units month)" does not work? it gives the error cannot convert between types. can someone give me the syntax to get all records that are 3 months old or less? Min
What about
select * from Table
where today - date(last_update) < 90
John Carlson
Informix DBA
WHSmith USA
Min Kim wrote:
>
> hi,
> can someone please tell me why "select * from tableName where (TODAY -
> last_update < 3 units month)"
>
> does not work? it gives the error cannot convert between types. can
> someone give me the syntax to get all records that are 3 months old or
> less?
>
> Min
>
> ------------------------------------------------------------------------
>
> Name: mkim.vcf
> mkim.vcf Type: VCard (text/x-vcard)
> Encoding: 7bit
> Description: Card for Min Kim
In DBACCESS try
SELECT * from tablename where last_update < (TODAY - 3 units month)
that should do it I think...
Rob Vorbroker
Min Kim <mkim@icpma.com> wrote in message
news:374AB582.342850CD@icpma.com...
> hi,
> can someone please tell me why "select * from tableName where (TODAY -
> last_update < 3 units month)"
>
> does not work? it gives the error cannot convert between types. can
> someone give me the syntax to get all records that are 3 months old or
> less?
>
> Min
>
Min, Instead of using 'TODAY', which is of data type date, try using 'CURRENT' which is of data type datetime year to fraction(5). Kind regards, John Bejarano. Min Kim wrote in message <374AB582.342850CD@icpma.com>... >hi, >can someone please tell me why "select * from tableName where (TODAY - >last_update < 3 units month)" > >does not work?