SHARE
TWEET

Untitled

a guest Aug 13th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getPrintedValues(p_string varchar2)
  2.  return varchar2
  3.  is
  4.   l_new_string varchar2(32700);
  5.   l_redex      varchar2(50) := '[^ -~]';
  6.  begin
  7.   SELECT REPLACE(REPLACE(REPLACE(REGEXP_REPLACE(p_string, l_redex, ''), '[CR-LF]', '' ),chr(9),''),chr(10),'8')
  8.     into l_new_string
  9.     from dual;
  10.    return l_new_string;
  11.  end;
  12.  
  13. ----------------------------
  14.  
  15.      select  trim(' ' FROM trim( '  PC FDC Warehouse' )) from dual -- ok
  16.      /
  17.      select  trim(CHR(9) FROM trim( '   PC FDC Warehouse' )) from dual
  18.      /
  19.      select trim( ' PC FDC Warehouse' ) from dual
  20.      /
  21.      select  ASCIISTR( '    PC FDC Warehouse' ) from dual
  22.      /
  23.      SELECT translate(
  24.            translate(
  25.                translate('  PC FDC Warehouse', CHR(10), '')
  26.            , CHR(13), '')
  27.        , CHR(09), '') as massaged
  28. FROM dual;
  29. /
  30. SELECT REGEXP_REPLACE(' PC FDC Warehouse', '[^ -~]','') from dual
  31. /
  32. select wims_aop_qry_rep_pkg.getPrintedValues('  PC FDC Warehouse') from dual
  33. /
  34. select dump('   PC FDC Warehouse') from dual;
  35. /
  36. select trim(replace(replace(replace('   PC FDC Warehouse',chr(9),''),chr(10),''),chr(13),'')) from dual
  37.  
  38. -------------------------------------
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top