Subject Re: [ib-support] DATE Comparision Problem
Author Adam Clarke
Is that date 12-OCT-2001 or 10-DEC-2001 ?

Try writing it as above and see how you go.

Cheers
Adam
----- Original Message -----
From: <jyotindra_bhoyania@...>
To: <ib-support@yahoogroups.com>
Sent: Tuesday, October 09, 2001 3:29 PM
Subject: [ib-support] DATE Comparision Problem


> Hi All,
>
> I am using Firebird version 1.0.0.338 and I have a very strange
> problem. I have a table in which I have got a field having TIMESTAMP
> datatype.
>
> Now when I query that table from ISQL as follows, It does not return
> ANYTHING. But the fact is there is a record having that value.
>
> SELECT * FROM BANK_HOLIDAY
> WHERE BANK_HO_DTE = '12/10/2001 18:46:12';
>
> That table is having that value and I am able to see it if I look at
> the data of the table.
>
> I, then tried few other combination also but have not been able to
> get result.
>
> Like:
>
> (1) SELECT * FROM BANK_HOLIDAY WHERE CAST (BANK_HO_DTE AS DATE )
> = '12/10/2001';
>
> (2) SELECT * FROM BANK_HOLIDAY WHERE CAST (BANK_HO_DTE AS CHAR )
> = '12/10/2001';
>
> (3) SELECT * FROM BANK_HOLIDAY WHERE BANK_HO_DTE = CAST( '12/10/2001'
> AS DATE);
>
> (4) SELECT * FROM BANK_HOLIDAY WHERE BANK_HO_DTE = CAST( '12/10/2001
> 18:46:12' AS TIMESTAMP );
>
> (5)SELECT * FROM BANK_HOLIDAY WHERE CAST (BANK_HO_DTE AS DATE )= CAST
> ( '12/10/2001' AS DATE );
>
> All failed to give me result. I am very much frustated due to this.
> Can anybody guide me on this.
>
> TIA,
>
> Jyotindra.
>
>
>
>
>
> To unsubscribe from this group, send an email to:
> ib-support-unsubscribe@egroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>