Inserting info with punctuation into a table. [message #36396] |
Sun, 25 November 2001 20:56 |
Claudi
Messages: 1 Registered: November 2001
|
Junior Member |
|
|
Hello folks Iam trying to fill in a table by prompting the user for information and one of the answer is at least a sentence with all punctuation and apostrophes and single quotes. How do I get them accepted by PL/SQL? Because I kept getting a termination error.
----------------------------------------------------------------------
|
|
|
Re: Inserting info with punctuation into a table. [message #36397 is a reply to message #36396] |
Sun, 25 November 2001 21:18 |
Rajarshi Dasgupta
Messages: 52 Registered: October 2001
|
Member |
|
|
' (single Quote) is a troublesome issue in Oracle....
Suppose the Sentence is: IT'S MY BOOK...
str varchar2(100) := 'IT'S MY BOOK...';
This will not work.
So, do the following:
str varchar2(100) := 'IT' || '''' || 'S MY BOOK...';
This will work fine and your data will be inserted correctly.
----------------------------------------------------------------------
|
|
|