我正在尝试将两个字符串字段(月和年)转换为可以在tableau中使用的日期字段。该表位于hadoop中。我试着使用tou date和concat,但结果是所有结果都是空的。
Proc SQL noerrorstop;
Connect to HADOOP (server=X);
Execute (set X) by HADOOP;
Execute (drop Table X) by HADOOP;
Execute (create Table X as
SELECT month, year
to_date(concat(YEAR,"-",MONTH,"-","01")) as date
from TableX
group by month, year
) by HADOOP;
DISCONNECT FROM HADOOP;
quit;
1条答案
按热度按时间fdbelqdn1#
年后缺少逗号,不需要group by.ALLOW tablex与table x不同?