私は連続変数の数について、次のエラーを取得:OUTER UNIONの最初の貢献者からSASでこのエラーを回避するにはどうすればよいですか? SASでデータセットをマージしようとすると
列115は、第二
からその の対応と同じタイプではありません
私は次のようにして、通常はこのエラーを回避することができました:
の同じ「タイプ」への変数のいずれかを変更するその他。たとえば、変数Aを数値型の文字型に変更し、他のデータセットの変数と一致するようにして、マージを可能にします。
私はCSVファイルとして一緒にマージしようとしているデータセットをインポートし、procインポートステップで "推測行"オプションを追加します。たとえば:
proc import datafile='xxxxx'
out=fadados
dbms=csv replace;
getnames=yes;
guessingrows=200;
run;
しかし、時々のCSVとしての私のファイルをインポートし、「guessingrows」を使用するにもかかわらず、私はまだ上記のエラーを取得し、時にはそれが非常に時間がかかることを非常に多くがありますすべての変数を実際に同じ「タイプ」に変換してデータセット間で一致させることは不可能です。
誰でもこのエラーを簡単に回避する方法について私に助言できますか?人々がこれを回避する別の方法はありますか?私はこのエラーを頻繁に受けて、すべての変数を変換するのに飽き飽きしています。別の方法が必要です!それはテストすることは困難である例がないと
proc sql;
title 'MED REC COMBINED';
create table combined_bn_hw as
select * from bndados
outer union corr
select * from hwdados;
quit;
And here is the output I get in the log:
21019 proc sql;
21020 title 'MED REC COMBINED';
21021 create table combined_bn_hw as
21022 select * from bndados
21023 outer union corr
21024 select * from hwdados;
ERROR: Column 115 from the first contributor of OUTER UNION is not the same type as its
counterpart from the second.
ERROR: Column 120 from the first contributor of OUTER UNION is not the same type as its
counterpart from the second.
ERROR: Column 173 from the first contributor of OUTER UNION is not the same type as its
counterpart from the second.
ERROR: Numeric expression requires a numeric format.
ERROR: Column 181 from the first contributor of OUTER UNION is not the same type as its
counterpart from the second.
ERROR: Column 185 from the first contributor of OUTER UNION is not the same type as its
counterpart from the second.
ERROR: Column 186 from the first contributor of OUTER UNION is not the same type as its
counterpart from the second.
21025 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
ありがとうございました! – chiccaboomberry
* SAS *でデータセットをマージしようとすると...このトライアルはどこですか?問題を再現するにはデータとコードが必要です。 – Parfait
通常のデータステップを使用してテーブルを追加するだけで、より有用なエラーメッセージが表示されます。 'データ結合_bn_hw;セットbndados hwdados;あなたの問題を解決することはできませんが、タイプの競合を持つ変数名が表示されます。 – Tom