FEEDBACKオプション
proc sql ;
create table temp1 as
select t1.*,
t2.product_name,
t2.product_price
from sales as t1 left join master as t2
on t1.product_code=t2.product_code
quit ;
のようにSELECT句で*を使用する場合に、
proc sql feedback ;
create table temp1 as
select t1.*,
~
と書くと、ログに*の内容が出力される
DESCRIBEステートメント
■Viewの場合
例えば上記と同じようなSQLプロシジャでViewを定義してある場合、
proc sql ;
create view temp1_vw as
select t1.*,
t2.product_name,
t2.product_price
from sales as t1 left join master as t2
on t1.product_code=t2.product_code
quit ;
以下のようなSQLプロシジャを実行すると、
proc sql ;
describe view temp1_vw ;
quit ;
ログにViewの定義情報が出力される(クエリ内容)
■Tableの場合
同じようにSQLプロシジャでTableを作成してある場合、
proc sql ;
create table temp1_tb as
select t1.*,
t2.product_name,
t2.product_price
from sales as t1 left join master as t2
on t1.product_code=t2.product_code
quit ;
以下のようなSQLプロシジャを実行すると、
proc sql ;
describe table temp1_tb ;
quit ;
ログにTableの定義情報が出力される(ラベル、フォーマット、レングス等)
0 件のコメント:
コメントを投稿