Tuesday, June 21, 2022

Sql - comma function

 CREATE OR REPLACE FUNCTION EX_number_format( ff number) RETURN char IS

   xx varchar2(100);

   yy varchar2(1);

   tt varchar2(100);

  x number:=0;

  begin

   xx:=to_char(ff,'99G990G990G990G990G990D00');

  for i  in 1..length(xx) loop

   yy:=substr(xx,i,1);

 if yy in ('1','2','3','4','5','6','7','8','9') then

  x:=i;

 exit;

 end if;

 end loop;

 tt:=substr(xx,x,length(xx));

return tt;

 END EX_number_format;


No comments:

Post a Comment

To generate a PDF using JavaScript in Oracle APEX from a collection

  To generate a PDF using JavaScript in Oracle APEX from a collection, you can follow these steps: 1. Create a button or link on your APEX p...