I am trying to add "datepart" to my date field in Information Map Studio and am getting an error when validating.
case when <<datepart(ZW_CURRENT_DATE_DIM.CALENDAR_DATE)>> > '08Nov2016'd then '2nd Quarter'
end
Attached is the error. Also, my limited experience with Information Map has required the << and >> as part of the code.
Well, never used information map, so apologies if this is not the item, but why do you have << and >> around the datepart function? Also, it may help if you actual post a picture ot the text of what the "error" is, perhaps that isn't a date variable?
Confirmed calendar date is a date variable.
Attached is the error. Also, my limited experience with Information Map has required the << and >> as part of the code.
In regular SQL, using the syntax "case when", you need a = between your expression and the constant.
Hi,
Why have you marked the post containing your error as the solution? Also, please post the erro as either text or picture in the post, I would not download any Office files.
The syntax of a case statement is:
case when <condition> then <result> [when...] else <result> end
Or
case <variable> when <value> then <result> [when...] else <result> end
As I say, never heard of this information map, but I have never seen any system using << >> around variables, that is an operator in some languages.
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.