Traditional web-based reporting with SAS BI tools

Using DATEPART in Information Map Studio

Accepted Solution Solved
Reply
Contributor
Posts: 41
Accepted Solution

Using DATEPART in Information Map Studio

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


Accepted Solutions
Solution
‎11-15-2016 04:57 PM
Contributor
Posts: 41

Re: Using DATEPART in Information Map Studio

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


All Replies
Esteemed Advisor
Esteemed Advisor
Posts: 6,726

Re: Using DATEPART in Information Map Studio

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?

Contributor
Posts: 41

Re: Using DATEPART in Information Map Studio

Confirmed calendar date is a date variable.

Contributor
Posts: 41

Re: Using DATEPART in Information Map Studio

Please see where I attached error.
Solution
‎11-15-2016 04:57 PM
Contributor
Posts: 41

Re: Using DATEPART in Information Map Studio

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

Esteemed Advisor
Posts: 5,094

Re: Using DATEPART in Information Map Studio

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

Data never sleeps
Esteemed Advisor
Esteemed Advisor
Posts: 6,726

Re: Using DATEPART in Information Map Studio

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.

Post a Question
Discussion Stats
  • 6 replies
  • 225 views
  • 1 like
  • 3 in conversation