View previous topic :: View next topic
|
Author |
Message |
Jimy Carol
New User
Joined: 31 Aug 2012 Posts: 25 Location: Australia
|
|
|
|
Hi ,
I am trying to use below SQL to update a column of a table
Code: |
UPDATE TABLE owner.table
SET COL1 = TRANSLATE (COL1,'A,B') |
After execution of SQL in SPUFI , the col1 data is turning into blank instead of converting all B's to A.
What is wrong I am doing , how can i correct the SQL , I want to replace a particular character in a column with some other character .
Thanks for your help .
Regards
Carol |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Translate uses three parameters. However, you are passing only two. You should match the quote after A so that B is recognized as third parameter. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
The syntax is incorrect; instead of supplying three parameters to TRANSLATE, you have only supplied two. |
|
Back to top |
|
|
Jimy Carol
New User
Joined: 31 Aug 2012 Posts: 25 Location: Australia
|
|
|
|
Thanks for help , I correcte the syntax as suggested by you and the sql works fine now . Thanks again for help ! |
|
Back to top |
|
|
|