Dear Team,
a
am getting below error :
ERROR: CLI describe error: [IBM][CLI Driver][DB2/LINUXX8664] SQL0104N An unexpected token "case" was found following "else
rstf.END_TS end". Expected tokens may include: "FROM". SQLSTATE=42601
Looks like Your Case statement Nesting is incorrect . try expanding all the scenarios like this :
case
when dt.DATE_TIME_KEY+900 < rstf.END_TS then
dt.DATE_TIME_KEY+900
when dt.DATE_TIME_KEY+900 > rstf.END_TS then rstf.END_TS
when dt.DATE_TIME_KEY > START_TS then dt.DATE_TIME_KEY
when dt.DATE_TIME_KEY < START_TS then rstf.START_TS
end
Looks like Your Case statement Nesting is incorrect . try expanding all the scenarios like this :
case
when dt.DATE_TIME_KEY+900 < rstf.END_TS then
dt.DATE_TIME_KEY+900
when dt.DATE_TIME_KEY+900 > rstf.END_TS then rstf.END_TS
when dt.DATE_TIME_KEY > START_TS then dt.DATE_TIME_KEY
when dt.DATE_TIME_KEY < START_TS then rstf.START_TS
end
In addition to your messed up CASE statement (statements?) are you really trying to SUM() dates?
What is in the variables DATE_TIME_KEY, END_TS and START_TS ?
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.