convert %S to null in plsql

為{幸葍}努か 提交于 2020-01-05 05:32:06

问题


I observe a problem after migrating my oracle form 6i to 11g. In a form I am generating windows batch command. part of the command is as below:

declare
    lv_content5c varchar2(300);
begin
    lv_content5c:=  '@Set sizeout2=%sizeout2:bytes=%';
    CLIENT_TEXT_IO.PUTF(out_file,lv_content5c);
    CLIENT_TEXT_IO.PUTF(out_file, CHR(10));     
    CLIENT_TEXT_IO.FCLOSE(out_file);
    client_host('cmd /c  start '|| lv_filename);
end;

it seems that when I store this text "'@Set sizeout2=%sizeout2:bytes=%'" in file oracleForm or Plsql convert it as below:

@Set sizeout2=nullizeout2:bytes=%

as it can be observe %s converted to null in output file. would you mind advising me what is the issue and have you ever face similar issue?

Please take note that my backend is 12c and frontend is 11gR2.


回答1:


PUTF takes the first string argument to be a format specification, with subsequent strings being the content. Also, you need a proper line terminator. So do PUT_LINE(out_file,lv_content5c); and delete the following line (the one with CHR(10)).



来源:https://stackoverflow.com/questions/48199635/convert-s-to-null-in-plsql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!