Oracle update trim spaces
Your email address will not be published. Notify me of follow-up comments by email. Notify me of new posts by email.
This site uses Akismet to reduce spam. Learn how your comment data is processed. If this is not specified, then a space is used. If it is a literal value, it needs to be in single quotes. As in, it removes characters from the beginning and the end of the string. For example, using CHR See the Examples section below for more information. If it is omitted, a space character is used for trimming. Can Oracle Trim the Last Character? But what if you have both?
Or it is mixed with spaces and tab characters CHR 9? Improve this question. Litisqe Kumar 2, 4 4 gold badges 24 24 silver badges 38 38 bronze badges. Add a comment. Active Oldest Votes. Improve this answer. I had to use the code above. Robin Day Robin Day Hiram Hiram 2, 1 1 gold badge 14 14 silver badges 13 13 bronze badges. SQL Server does not support for Trim function. Thilina Sandunsiri Thilina Sandunsiri 6 6 silver badges 16 16 bronze badges. Christoffer Lette Christoffer Lette Simon Simon 1, 10 10 silver badges 22 22 bronze badges.
Sukanta Saha Sukanta Saha 21 3 3 bronze badges. Salim Lyoussi Salim Lyoussi 2 2 silver badges 7 7 bronze badges. Arulmouzhi Arulmouzhi 1, 9 9 silver badges 16 16 bronze badges. Well, it depends on which version of SQL Server you are using. Daniel Urdaneta Daniel Urdaneta 37 3 3 bronze badges. Improve this answer. Trinimon Dax Dax 8 8 silver badges 27 27 bronze badges.
The difference was that in the first table I was using varchar2 30 and in the second table where trim didn't work I had char 30 After modifying the second table from char 30 to varchar2 30 trim worked as expected. Robert 5, 43 43 gold badges 61 61 silver badges bronze badges.
Amit Amit While it's simpler code, this does nothing to solve the OP's actual problem. Unless you know something we don't - in which case, please expand your answer to say why. Ravi Tamil Tamil 23 3 3 bronze badges. David Aldridge David Aldridge Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog.
0コメント