誰でも私のカスタム関数の結果に関数定義で指定する長さを与えるためにPROC SQLを取得する方法を教えてもらえますか? Datastepは問題ありませんが、SQLではデフォルトの長さが200文字になります。その上で私のログがあるsqlは私のfcmp関数の長さを尊重しない
proc fcmp outlib = work.funcs.funcs ;
* Note type/length specification ;
function testy(istr $) $11 ;
return ('bibbitybobb') ;
endsub ;
quit ;
options cmplib = work.funcs ;
data from_dstep ;
set sashelp.class ;
tes = testy(name) ;
run ;
proc sql ;
create table from_sql as
select *
, testy(name) as tes
from sashelp.class
;
describe table from_dstep ;
describe table from_sql ;
quit ;
:ここ
は、問題を示すコードである
47 describe table from_dstep ;
NOTE: SQL table WORK.FROM_DSTEP was created like:
create table WORK.FROM_DSTEP(bufsize=65536)
(
Name char(8),
Sex char(1),
Age num,
Height num,
Weight num,
tes char(11)
);
48 describe table from_sql ;
NOTE: SQL table WORK.FROM_SQL was created like:
create table WORK.FROM_SQL(bufsize=65536)
(
Name char(8),
Sex char(1),
Age num,
Height num,
Weight num,
tes char(200)
);
あなたが見ることができるように、datastepは私に私の「TES」に関する11の長さを与えましたSQLを使用すると長さが11になる方法はありますか?