Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 16 Oracle Analytics Lounge
- 216 Oracle Analytics News
- 43 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 79 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
BI Publisher Data Model returns 'FAILED TO LOAD XML' error when using a parameter in a LIKE logic

I was trying to use a parameter (P_FIELD1) in my WHERE clause in a LIKE statement in a data model im working on and it wont work and would always return 'FAILED TO LOAD XML' error. I have tried making the parameter type as string too and still encounter the same error. Is my syntax incorrect or is there any other method/function i could use to achieve this? Refer to the statements below that i have tried and still encounter the same error. Thanks.
select * from MYTABLE WHERE FIELD1 LIKE ('%' + :P_FIELD1 + '%')
select * from MYTABLE WHERE TO_CHAR(FIELD1) LIKE ('%' + :P_FIELD1 + '%')
Answers
-
You aren't using Oracle SQL Syntax ... || (dbl pipe) for concat:
select * from MYTABLE WHERE FIELD1 LIKE ('%' || :P_FIELD1 || '%')
select * from MYTABLE WHERE TO_CHAR(FIELD1) LIKE ('%' || :P_FIELD1 || '%')
0