query issue with number column

  • From: "Harvinder Singh" <Harvinder_Singh@xxxxxxxxx>
  • To: "ORACLE-L" <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 11 Nov 2008 13:12:54 -0500

Hi,

 

Following 4 queries return 1 row each and COLA is defined as number(3):

 

SELECT to_char(COLA) FROM TABLEA WHERE trunc(COLA) = 234

SELECT * FROM TABLEA WHERE to_char(COLA) = to_char(234)

SELECT * FROM TABLEA WHERE COLA > 233

SELECT * FROM TABLEA WHERE COLA >= 234

 

But following query returns 0 rows, what can be the possible issue:

 

SELECT * FROM TABLEA WHERE COLA = 234

 

Environment : Oracle 9.2 on Windows

 

Thanks

--Harvinder

 


The information in this email is confidential and may be legally privileged. It 
is intended solely for the addressee. Access or use by any other person to this 
internet email is not authorized and may be unlawful. If you are not the 
intended recipient, please delete or destroy this email. If you do not wish to 
receive future emails from this sender, please reply directly to this email 
requesting you be removed from any mailing list.

Other related posts: