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 ?
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: