Feature #21902
closedSupport SQL "LOCATE"
0%
Description
the LOCATE function isn't supported in DBAL.
In templavoila i added this in select clause:
CASE WHEN LOCATE', 'tx_templavoila_tmplobj') . ', datastructure)>0 THEN 2 ELSE 1 END scope
Syntax of LOCATE:
LOCATE
Result is the position of needle, simular to php "strpos"
Simular would be following SQL functions:
POSITION, INSTR, SUBSTR, SUBSTRING, SUBSTRING_INDEX etc,
see http://dev.mysql.com/doc/refman/5.1/en/string-functions.html
(issue imported from #M13134)
Files
Updated by Xavier Perseguers almost 15 years ago
Actually there is two needs here, one for supporting LOCATE and one for supporting CASE
Updated by Xavier Perseguers almost 15 years ago
Equivalent of LOCATE
In Oracle: "instr" http://www.adp-gmbh.ch/ora/sql/instr.html
In PostgreSQL: "strpos" http://www.postgresql.org/docs/8.0/interactive/functions-string.html
Updated by Xavier Perseguers almost 15 years ago
Found some nice table for Oracle's equivalent in MSSQL:
http://www.dba-oracle.com/oracle_news/2005_12_16_sql_syntax_differences.htm
Updated by Xavier Perseguers almost 15 years ago
Committed pre_13134_*-cleanup.diff to
Core trunk (rev. 6725)
DBAL trunk (rev. 28422)
Committed 13134_*.diff to
Core trunk (rev. 6726)
DBAL trunk (rev. 28423)