RE: query issue with number column

From: Elliott, Patrick <patrick.elliott_at_medtronic.com>
Date: Tue, 11 Nov 2008 13:12:25 -0600
Message-ID: <3B8B6A1700202C43A89D61CE495C894E0F5874344A@MSPM1BMSGM103.ent.core.medtronic.com>


Are you sure it is a number(3)??? The only way I could see the below happening is if you defined it as number(3.1).

Pat



From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Harvinder Singh Sent: Tuesday, November 11, 2008 12:13 PM To: ORACLE-L
Subject: query issue with number column

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.

[CONFIDENTIALITY AND PRIVACY NOTICE] Information transmitted by this email is proprietary to Medtronic and is intended for use only by the individual or entity to which it is addressed, and may contain information that is private, privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please delete this mail from your records. To view this notice in other languages you can either select the following link or manually copy and paste the link into the address bar of a web browser: http://emaildisclaimer.medtronic.com

--

http://www.freelists.org/webpage/oracle-l Received on Tue Nov 11 2008 - 13:12:25 CST

Original text of this message