BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
carmendee
Obsidian | Level 7

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

1 ACCEPTED SOLUTION

Accepted Solutions
carmendee
Obsidian | Level 7

Attached is the error.  Also, my limited experience with Information Map has required the << and >> as part of the code.

View solution in original post

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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?

carmendee
Obsidian | Level 7

Confirmed calendar date is a date variable.

carmendee
Obsidian | Level 7
Please see where I attached error.
carmendee
Obsidian | Level 7

Attached is the error.  Also, my limited experience with Information Map has required the << and >> as part of the code.

LinusH
Tourmaline | Level 20

In regular SQL, using the syntax "case when", you need a = between your expression and the constant.

Data never sleeps
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1426 views
  • 1 like
  • 3 in conversation