Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: yannick_bur on July 26, 2023, 04:45:59 pm
-
Hi everyone
I have an issue with my SQL statement within Sparx EA.
Within my SQL statement I would like to find out, if a string starts with a underscore.
My statement is as follows:
.....
AND SourceObject.NAME LIKE '\_%'
.....
From what I know, the escape character is usually the backslash before the underscore to escape the special character.
If I do the exact same SQL statement directly on our Oracle Database it works perfectly fine.
However, if I try to do this with a custom search within Sparx EA it doesn't work.
Has anyone the same issue or can anyone help me with this?
Thanks already in advance!
-
No Oracle knowledge...
- Have you tried \\_ ? Might be that your compiler treats \_ as a single special char?!
- Look into https://stackoverflow.com/questions/21380261/underscore-is-not-working-in-oracle-like-clause (https://stackoverflow.com/questions/21380261/underscore-is-not-working-in-oracle-like-clause) where they use the escape keyword.
q.
-
Hey qwerty. thanks for your reply
I have tried both and it doesn't seem to work
The strange thing is that if I use the SQL statement like this '\_%' I don't get an error message or something. There is just no result even though I know for a fact that there is 1 result that should be shown.
Trying two backslashes also doesn't change anything (no result) and with the "escape" keyword I get an error message from the Oracle OLEDB that there is an issue with sorting the results (also strange).
Maybe Oracle doesn't know the "escape" keyword? (I'm not a DB specialist so i sadly don't know)
-
You might send a priority support request to Sparx. Not sure you will find many Oracle guys here that are deep in those matters.
q.