Home » SQL & PL/SQL » SQL & PL/SQL » CHAR ' (ORACLE 6i)
CHAR ' [message #646900] Thu, 14 January 2016 03:59 Go to next message
NNAAEE
Messages: 4
Registered: January 2016
Junior Member
How insert word Ceed's in a oracle table?
Re: CHAR ' [message #646901 is a reply to message #646900] Thu, 14 January 2016 04:10 Go to previous messageGo to next message
John Watson
Messages: 9002
Registered: January 2010
Location: Global Village
Senior Member
Welcome to the forum. Please read our OraFAQ Forum Guide and How to use [code] tags and make your code easier to read

I think you are asking how to insert a string containing an apostrophe? Look up the use of quote delimiters for string literals here,
http://docs.oracle.com/database/121/SQLRF/sql_elements003.htm#SQLRF00217
Re: CHAR ' [message #646902 is a reply to message #646901] Thu, 14 January 2016 04:47 Go to previous messageGo to next message
NNAAEE
Messages: 4
Registered: January 2016
Junior Member
Thanks!
Re: CHAR ' [message #646903 is a reply to message #646902] Thu, 14 January 2016 05:39 Go to previous messageGo to next message
javed.khan
Messages: 340
Registered: November 2006
Location: Banglore
Senior Member

user escape character or just insert using '''
insert into test values ('Ceed''s');
Re: CHAR ' [message #646904 is a reply to message #646903] Thu, 14 January 2016 05:43 Go to previous messageGo to next message
NNAAEE
Messages: 4
Registered: January 2016
Junior Member
Thanks!
Re: CHAR ' [message #646905 is a reply to message #646903] Thu, 14 January 2016 05:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

There is no escape character in SQL.
You can either double the quotes or use the quote delimiter syntax es explained in John's link.
Here's example:
SQL> select 'Ceed''s' m1, q'(Ceed's)' m2, q'/Ceed's/' m3, q';Ceed's;' m4 from dual;
M1     M2     M3     M4
------ ------ ------ ------
Ceed's Ceed's Ceed's Ceed's

Re: CHAR ' [message #646911 is a reply to message #646905] Thu, 14 January 2016 07:54 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>(ORACLE 6i)
I suspect above is not correct

post full output of SQL below

SELECT * FROM V$VERSION;
Re: CHAR ' [message #646920 is a reply to message #646911] Thu, 14 January 2016 13:42 Go to previous messageGo to next message
Littlefoot
Messages: 21826
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
That would be Forms 6i, I presume.
Re: CHAR ' [message #646921 is a reply to message #646920] Thu, 14 January 2016 14:18 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
But that does not answer the question about which Oracle version
Re: CHAR ' [message #647017 is a reply to message #646921] Mon, 18 January 2016 06:25 Go to previous messageGo to next message
NNAAEE
Messages: 4
Registered: January 2016
Junior Member
Oracle8i Release 8.1.7.0.0 - Production
PL/SQL Release 8.1.7.0.0 - Production
CORE 8.1.7.0.0 Production
TNS for 32-bit Windows: Version 8.1.7.0.0 - Production
NLSRTL Version 3.4.1.0.0 - Production
Re: CHAR ' [message #647018 is a reply to message #647017] Mon, 18 January 2016 07:42 Go to previous messageGo to next message
Michel Cadot
Messages: 68776
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

If you are in 8i then you can't use the quote delimiter syntax, your only solution is to double the quotes.

Do you also use Windows NT4? Wink

Re: CHAR ' [message #647026 is a reply to message #647018] Mon, 18 January 2016 08:38 Go to previous message
EdStevens
Messages: 1377
Registered: September 2013
Senior Member
Michel Cadot wrote on Mon, 18 January 2016 07:42

If you are in 8i then you can't use the quote delimiter syntax, your only solution is to double the quotes.

Do you also use Windows NT4? Wink



The OP must be working here. Smile
Previous Topic: SQL Query
Next Topic: VARCHAR2 Convert to H:MI:SS tt (merged 2)
Goto Forum:
  


Current Time: Fri Jun 26 23:46:56 CDT 2026