Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I update the substring of a string value?

User_6Q8J8Jan 20 2012 — edited Jan 20 2012
UPDATE table1
SET  SUBSTR  (TO_CHAR(field_value),3,2) = ' 50'  and SUBSTR (TO_CHAR(field_value),5,2)  =  '50'
where  ( SUBSTR(TO_CHAR(field_value), 3, 2) =  '100' ) or ( SUBSTR(TO_CHAR(field_value), 5, 2) =  '100' )
tried the above in TOAD and I got "ORA-00927: missing equal sign." Please help!

data type for field_value is number. oracle version is 10g

thank you
This post has been answered by Centinul on Jan 20 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 17 2012
Added on Jan 20 2012
2 comments
29,042 views