- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.sql
More file actions
Latest commit
5 lines (3 loc) · 415 Bytes
/
Copy pathfunctions.sql
File metadata and controls
5 lines (3 loc) · 415 Bytes
1
2
3
4
5
CREATE OR REPLACEFUNCTIONdbl_excel_serial_date_to_date(x) AS (DATE'1900-01-01'+ CAST(trunc(x) ASINTEGER));
CREATE OR REPLACEFUNCTIONstr_excel_serial_date_to_date(x) AS dbl_p_excel_serial_date(CAST(x AS DOUBLE));
CREATE OR REPLACEFUNCTIONstrip_for_match(a) ASLOWER(STRIP_ACCENTS(REGEXP_REPLACE(REGEXP_REPLACE(a, '&', 'and', 'g'), $$[-★|–#;@?´‛_“”ʻ‘’ʻ:"*/)('`+&.\s,\p{Cf}]$$, '', 'g')));