Home » SQL & PL/SQL » SQL & PL/SQL » The ' Char in Oracle
The ' Char in Oracle [message #36169] Thu, 08 November 2001 08:16 Go to next message
Niraj Patel
Messages: 1
Registered: November 2001
Junior Member
I am using a HTML form which is linked up to a Oracle DB. In some of the fields they have to write a short description of themselves. The people filling out the form ofen need to put the following character in there description;


They use words like; don't ,etc.

Although Oracle doesnt accept this (ORA-00917 missing comma, error given). Anyone got any ideas as to how I can sort this problem out. I need to let users use that char o/w I'd be a pretty bad web designer.

Re: The ' Char in Oracle [message #36171 is a reply to message #36169] Thu, 08 November 2001 08:30 Go to previous messageGo to next message
Messages: 59
Registered: November 2001
One way to solve this problem is on the POST CHANGE trigger just replace the single quote with an apostrophe. When you save this into a database you will be saving an apostrophe not a single quote.

:emp.ename := REPLACE(:emp.ename,'''','`');

Re: The ' Char in Oracle [message #36796 is a reply to message #36169] Fri, 21 December 2001 01:03 Go to previous message
Messages: 12
Registered: December 2001
Junior Member
just preprocess programmatically the query before executing it .. do as this
for any value of any column if u have the value containing ' replace it with 2 single quotes ''
this will work for sure

Previous Topic: How can i pass the number of users who are connected in the database
Next Topic: Error in Trigger
Goto Forum:

Current Time: Fri May 24 09:11:35 CDT 2024