Or are the little hats just treated as text characters because it's a LOCATE function and not a SIMILAR TO or REGEXP or REGEXP_SUBSTR ?
snippet from a WHERE clause....
AND ( LOCATE ( ''^xxxyy^'' , ''^'' + table.column + ''^'' ) > 0 OR ''^xxxyy^'' ='''' )
How am I meant to interpret the second part of it? (The ''^xxxyy^'' ='''' part)
Request clarification before answering.
The predicates that you have given are not regular expressions by merely a normal text locate search ( LOCATE ( ''^xxxyy^'' , ''^'' + table.column + ''^'' ) > 0 ) and text string equality test ( ''^xxxyy^'' ='''' ).
Note that what appears to be double quotes are in fact double single quotes. This leads me to believe that you have copied your code snippet from a piece of code that is composing an expression that will be used in an EXECUTE IMMEDIATE !
If we take the code snippet at its face value (and ignoring the fact in the previous paragraph), the '^xxxyy^' = '' predicate will always evaluate to FALSE so it is of little use in the predicate evaluation.... BUT ...
The LOCATE( ''^xxxyy^'' , ''^'' + table.column + ''^'' ) > 0 predicate makes me believe that the xxxyy string is going to be replaced with a "real value" before the expression is evaluated by the EXECUTE IMMEDIATE. Assuming this is true, then it would imply that the LOCATE expression is checking to see if the named column matches the replacement string.
It may be helpful if you were to either provide more context or show us the full piece of code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.