Categories
- All Categories
- Oracle Analytics and AI Learning Hub
- 44 Oracle Analytics and AI Sharing Center
- 19 Oracle Analytics and AI Lounge
- 278 Oracle Analytics and AI News
- 56 Oracle Analytics and AI Videos
- 16.2K Oracle Analytics and AI Forums
- 6.4K Oracle Analytics and AI Labs
- Oracle Analytics and AI User Groups
- 103 Oracle Analytics and AI Trainings
- 20 Oracle Analytics and AI 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