Invalid SELECT Sql Statement on External Breakdown

Stanislaw1
Tera Contributor

I'm trying to create an external Breakdown. 
As soon as I add a WHERE Clause I get the following error (see also Attachment):

 

Collecting elements for breakdown Langläufer Breakdowns[2dc93a880ba816106f5ac49e3acbcf25] failed Cannot invoke "java.util.List.size()" because "atts" is null
I'va tried every version I can think of...

SELECT DISTINCT SUBSTR(GESCHAEFTSBEREICH, 1,4) AS id, SUBSTR(GESCHAEFTSBEREICH, 1,4) AS name FROM my_Table WHERE EBENE='Geschäftsbereich'
SELECT DISTINCT SUBSTR(GESCHAEFTSBEREICH, 1,4) AS id, SUBSTR(GESCHAEFTSBEREICH, 1,4) AS name FROM my_Table WHERE GESCHAEFTSBEREICH IS NOT NULL
SELECT DISTINCT SUBSTR(GESCHAEFTSBEREICH, 1,4) AS id, SUBSTR(GESCHAEFTSBEREICH, 1,4) AS name FROM my_Table WHERE
Everytime same Problem....

As soon as I delete the WHERE Clause the SQL statement is accepted by the system. However I need to Filter the Records.

By the way the Database is Oracle.

Does anyone have an idea why the error appears?

2 REPLIES 2

Abbas_5
Tera Sage
Tera Sage

Hello @Stanislaw1,

For similar kind of issue, please refer to the below link:
https://www.servicenow.com/community/itsm-forum/invalid-select-sql-statement-on-external-indicator/m...

 

If it is helpful, please mark it as helpful and accept the correct solution.

Thanks & Regards,

Abbas Shaik

Hello,

I know this post and have already tried it. Unfortunately it didn't help me.
The difference is, that she had the problem with the SQL in the indicator's SQL statement field. I have the problem with setting up the breakdown.

 

My indicator accepts my written WHERE Clause without any problems. See appendix Indicator_sql_statement