SAP Knowledge Base Article - Preview

3235036 - Strange result using str_replace - SAP ASE

Symptom

  • Different results between two servers when using str_replace. 
  • On the "problem dataserver" the dot separator does not disappear.  For example:
    • Problem server:
      select str_replace(ltrim(str(123.40,10,2)),'0',' ')
      go
      123.4
      select str_replace(ltrim(str(123.04,10,2)),'0',' ')
      go
      123  4  <-     adds a space not a dot as would expect
       
    • Good server, (same OS/dataserver versions) the same request without "issue":
      select str_replace(ltrim(str(123.40,10,2)),'0',' ')
      go
      123.4
      select str_replace(ltrim(str(123.04,10,2)),'0',' ')
      go
      123. 4    <-      the result output does NOT lose the separator in the form of a dot


Read more...

Environment

SAP Adaptive Server Enterprise 16.0

Product

SAP Adaptive Server Enterprise 15.7

Keywords

str_replace, string replace  , KBA , BC-SYB-ASE , Sybase ASE Database Platform (non Business Suite) , How To

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.