Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 14 Oracle Analytics Lounge
- 210 Oracle Analytics News
- 41 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 77 Oracle Analytics Trainings
- 14 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
CASE Statement using DATES

Hi all,
I'm trying to filter on the following logic: if Date Sent is null, then 0, if Date Sent is not null, then Start Date minus Date Sent
Here's the syntax I'm currently using:
CASE WHEN "Agreement Sent Date"."Date" IS NULL
THEN '0'
ELSE TIMESTAMPDIFF(SQL_TSI_MONTH, "Agreement Start Date"."Date", "Agreement Sent Date"."Date")
END
I get the following error when I run the report, and really can't make out what it's trying to tell me:
Datatype(INTEGER) nullable(1) unicode(1) external char(0) conversion to datatype(VARCHAR) nullable(1) unicode(0) external char(0) is not supported
Anyone mind explaining what I'm doing wrong?
Thank you in advance!
Answers
-
Do I need to cast anything?
0 -
CASE WHEN "Agreement Sent Date"."Date" IS NULL
THEN 0
ELSE TIMESTAMPDIFF(SQL_TSI_MONTH, "Agreement Start Date"."Date", "Agreement Sent Date"."Date")
END
OR
CASE WHEN "Agreement Sent Date"."Date" IS NOT NULL
THEN TIMESTAMPDIFF(SQL_TSI_MONTH, "Agreement Start Date"."Date", "Agreement Sent Date"."Date")
ELSE 0
END
0