on 05-17-2015 2:12 PM
Hi Experts,
I am stuck up with a weird error while using the Case function the IDT. The data foundation for the universe is a data model (table) from HANA database.
Below is the code which I am using. When I validate, it gives the error (image attached). When i save with the error and come out to check the auto generated script (image attached), there is a bracket in the line no 7 which is causing the error.
Code --> CASE WHEN @Prompt('Enter Date','D',,Mono,Free)='2000-01-01' THEN current_date ELSE @Prompt('Enter Date','D',,Mono,Free) END
Error Msg --> SAP DBTech JDBC: [257] (at 160): sql syntax error: line 7 col 1 (at pos 160)
Auto Generated Script:
SELECT
Table__1."DATE_SQL"
FROM
"_SYS_BIC"."sp-dev/AV_MKPF_MSEG_V03" Table__1
WHERE
( CASE WHEN @Prompt('Enter Date','D',,Mono,Free)='2015-05-01' THEN current_date ELSE @Prompt('Enter Date','D',,Mono,Free) END
)
Appreciate your help.
Thanks,
Rishav.
There should be an object reference in the where clause. For example, Sales_Date = case when ....
But in your case after the where clause there is no such column reference and hence the error.
Helps ?
Regards,
Naras
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.