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 -> Oracle Select Problem

Oracle Select Problem

From: Tarbuza Smith <tarbuza_at_yahoo.com>
Date: 23 Oct 2002 18:03:52 -0700
Message-ID: <5b3807b2.0210231703.16385672@posting.google.com>


I have a web interface where user types in name and date of birth. It is posted as as post method of form action and Java Servlet parses these two values and store as a String. Till upto here, everything is fine.

Actually data is stored in a date format in Oracle whereas web interface data is in a string format. I am trying to use to_char but I am getting error messasge. I am checking whether the user who typed in account number and birth date exists in the Oracle database or not.

select ACCOUNT,BirthDate from members WHERE ACCOUNT='"
+sAccount+"' AND to_char(BirthDate,'mm/dd/yyyy')="
+sBirthDate);

I am getting the following error message:

Error Code:java.sql.SQLException: ORA-01722: invalid number

Any help would be greatly appreciated. Thanks in advance. Received on Wed Oct 23 2002 - 20:03:52 CDT

Original text of this message

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