-
Hi,
I wanted to insert the row which contains the value like
Owner's.
I am updating the column like the following way
Update temp set rpt_columns='Project Name, Division,Owner's,District' where rpt_name='1099';
I am getting the following error in the above statement
ORA-01756: quoted string not properly terminated.
Because I am inserting the value Owner's into the table.
Please help me out how do we enter the special characters like above in the table. I used escape on and tried still its not worked.
Thanks in advance
Admala.
-
Which escape character did u use, was it \ before ' ??
-
You can either use the escape character (\') or use '' (two single quotes) to insert a string with a single quote.
-
Originally posted by Krutsinger
You can either use the escape character (\') or use '' (two single quotes) to insert a string with a single quote.
Here I am writing the query in the following way
update rem_reports set RPT_COLUMNS='Project Name, Division, District, Program, Purpose, Tract Number,Owner\'s Name, Acreage, Acquired Cost, Estate Code, Remarks,
Method of Accomplishment'
where rpt_name='1019'
RPT_COLUMN is a VARCHAR2(2000) in the table.
Thank You,
Praveen.
-
Go Easy ...
Just Put The 2 Single Quotes within the String if you want a single quote there.
update rem_reports set RPT_COLUMNS='Project Name, Division, District, Program, Purpose, Tract Number,Owner''s Name, Acreage, Acquired Cost, Estate Code, Remarks,
Method of Accomplishment'
where rpt_name='1019' ;
This will solve your Problem..
Thanks..
-
In general, anytime you have strange characters you want to insert, you can use the CHR function. For the single quote it is CHR(39).
If you want to see a listing of what all of the characters are, here is a little trick :
select rownum, chr(rownum) from dba_objects
where rownum < 300;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|