Home » SQL & PL/SQL » SQL & PL/SQL » Inserting info with punctuation into a table.
Inserting info with punctuation into a table. [message #36396] Sun, 25 November 2001 20:56 Go to next message
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 Go to previous message
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.

----------------------------------------------------------------------
Previous Topic: Re: returning ref cursor variables from oracle
Next Topic: PLEASE HELP, URGENT
Goto Forum:
  


Current Time: Fri Mar 29 03:13:49 CDT 2024