substring command not taking $ symbol in string

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • abhishek20c
    New Member
    • Dec 2009
    • 1

    substring command not taking $ symbol in string

    Hi when i am doing any string operation using SUBSTR on a string containing '$' then the SUBSTR commnad is taking string upto '$' only.
    For example ABCD$defg then the SUBSTR will consider ABCD only as string.

    What is the alternate method of writing the string having $ so that it will be taken as complete string.
  • arjunsinghsamant
    New Member
    • Jan 2010
    • 3

    #2
    replace that :

    select replace(substr( replace(substr( 'ABCD$defg',1), '$','r'),1,9),' r','$') from sysibm.sysdummy 1


    is it works well as per ur need?

    Comment

    Working...