Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> numbers in varchar2 field

numbers in varchar2 field

From: <hinerman_at_gmail.com>
Date: 8 Jun 2006 20:56:07 -0700
Message-ID: <1149825367.281761.22990@i40g2000cwc.googlegroups.com>


I have a table with a varchar2(25) field. Most of the data in there is a 9 digit number, while a few records have 4 digit numbers. I have it as a varchar2 field to allow for some instances of leading zeros. My problem is that the 4 digit numbers aren't behaving like strings. If I query the table like where fieldName = '4231', it doesn't return any results. But if I query where fieldName = 4231, without the quotes, it returns results. Is there some reason these records are being handled differently? Received on Thu Jun 08 2006 - 22:56:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US