F_
<< F_REPLACE (F_REPLACE4, F_REPLACE8) F_BIGREPLACE | IBExpert UDF Functions | F_CONVERTSYMBOLS U_CONVERTSYMBOL >>
F_REPLACESTRING (..4, ..8) F_BIGREPLACESTRING
- compatibility to FreeUDFLib AvERP, GrUDF
U_REPLACESTRING (..4, ..8)
- function from adhoc
- Compatible with UTF-8
- Input VARCHAR(32760) string where a character string had to be exchanged, VARCHAR(254) old string, VARCHAR(254) new string, INTEGER 0 = replace only the first occurrence, 1 = replace all occurrences, INTEGER 0 = consider upper and lower case, 1 = not consider
- Output VARCHAR(32760) string with replaced characters from parameter 2 with characters from parameter 3
Example
SELECT 'This is Attempt two Test three TEST' AS ISCORRECT, F_REPLACESTRING('This is Test two Test three TEST', 'Test', 'Attempt', 0, 0) FROM RDB$DATABASE;
Expected results:
ISCORRECT F_REPLACESTRING ==================================== ================================================= This is Attempt two Test three TEST This is Attempt two Test three TEST
Example
SELECT 'This is Attempt two Test three TEST' AS ISCORRECT, F_REPLACESTRING('This is Test two Test three TEST', 'Test', 'Attempt', 0, 1) FROM RDB$DATABASE;
Expected results:
ISCORRECT F_REPLACESTRING ==================================== ================================================= This is Attempt two Test three TEST This is Attempt two Test three TEST
Example
SELECT 'This is Attempt two Attempt three TEST' AS ISCORRECT, F_REPLACESTRING('This is Test two Test three TEST', 'Test', 'Attempt', 1, 0) FROM RDB$DATABASE;
Expected results:
ISCORRECT F_REPLACESTRING ====================================== ========================================================= This is Attempt two Attempt three TEST This is Attempt two Attempt three TEST
Example
SELECT 'This is Attempt two Attempt three Attempt' AS ISCORRECT, F_REPLACESTRING('This is Test two Test three TEST', 'Test', 'Attempt', 1, 1) FROM RDB$DATABASE;
Expected results:
ISCORRECT F_REPLACESTRING ====================================== ============================================================ This is Attempt two Attempt three TEST This is Attempt two Attempt three TEST
Example
SELECT NULL AS ISCORRECT, F_REPLACESTRING(NULL, NULL, NULL, NULL, NULL) FROM RDB$DATABASE;
Expected results:
ISCORRECT F_REPLACESTRING ========= ====================================================== <null> <null>
back to top of page
<< F_REPLACE (F_REPLACE4, F_REPLACE8) F_BIGREPLACE | IBExpert UDF Functions | F_CONVERTSYMBOLS U_CONVERTSYMBOL >>