我在SAS EG工作,我的代码如下:
proc sql;
CREATE TABLE new as
SELECT f1,f2
FROM work.orig
WHERE f1<>'x'
;
这很有效。
但是,当我添加一个VALIDATE选项时,如下所示,我收到一个错误: 错误22-322:语法错误,期望以下之一:(,SELECT。
ERROR 202-322:无法识别选项或参数,将被忽略。
proc sql;
CREATE TABLE new as
VALIDATE
SELECT f1,f2
FROM work.orig
WHERE f1<>'x'
;
如何在proc sql中使用validate选项?
答案 0 :(得分:2)
我的理解是您不能将session.createQuery("select s.to_date, " +
" concat(e.first_name,'', e.last_name) as FullName, " +
" t.title as Title, s.salary as Salary " +
" from Department as d " +
" inner join d.employees as e " +
" inner join e.salary as s " +
" inner join e.title t " +
" where s.to_date = '9999-01-01' " +
" AND d.dept_no = 'd007' " +
" order by e.emp_no, s.to_date desc");
与VALIDATE
声明一起使用。
验证基础CREATE
SELECT
如果成功,那么您的proc sql;
VALIDATE
SELECT f1,f2
FROM work.orig
WHERE f1<>'x'
;
quit;
声明将有效。