Skip to Main Content

Analytics Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Syntax error in formula

877144Jul 21 2011 — edited Jul 22 2011
Hi all,

Hopefully this is a really stupid question with a simple solution, so I can get on with my work - optimistic as always.

I'm trying to change data returned from a particular field from a series of dates to one of two text values. However, Discoverer doesn't seem to like the data point I'm referencing and I can't see a way around it. The calculation I want to create is:

CASE WHEN Applicant and Student Details.Uncond Date = 'NULL' THEN 'Conditional' ELSE 'Unconditional' END

When submitting this, I get the following error message:

Error in formula - unexpected end of formula -
Error: Syntax error: token and at position 22

I can see why the error is occurring, but can't find a solution. When I add inverted commas around the data point (so the calculation reads CASE WHEN 'Applicant and Student Details.Uncond Date' = 'NULL' THEN 'Conditional' ELSE 'Unconditional' END) Discoverer accepts the calculation, but it appears it then doesn't reference the data properly - it thinks I'm looking for a completely different 'Applicant and Student Details.Uncond Date' and returns 'Unconditional' for every entry, even when it should return 'Conditional'.

I saw a reply to a similar problem suggest that the data point should be framed by quotation marks (so the calculation would read CASE WHEN "Applicant and Student Details.Uncond Date" = 'NULL' THEN 'Conditional' ELSE 'Unconditional' END), but when I try this Discoverer changes the quotation marks for inverted commas and I get the same result as above.

Does anybody have any ideas how I can solve this?

Thanks in advance,

Martin
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 19 2011
Added on Jul 21 2011
3 comments
1,014 views