Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Single byte processing function

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

CREATE OR REPLACE Function ZL_GetSinglebyte_string

(

strValue_IN varchar2,

numValue_IN number

)

Return Varchar2 Is

v_temp varchar2(200);

v_return varchar2(200);

v_num number:=0;

v_sum number:=0;

idx number :=1 ;

idy number :=0 ;

BEGIN

IF lengthb(strValue_IN)>=numValue_IN then

WHILE idx numValue_IN then

v_return := v_return||substr(strValue_IN,1,idx-1)||' ';

exit;

elsif v_num = numValue_IN then

v_return := v_return||substr(strValue_IN,1,idx);

exit;

else

idx := idx + 1 ;

END IF;

END LOOP;

ELSE

v_sum := numValue_IN - LENGTHB(strValue_IN);

v_return := v_return||strValue_IN;

WHILE idy

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report