Add better handling for different phone number formats

This commit is contained in:
2024-06-20 18:28:30 +02:00
parent 8a15e8d8a8
commit 237d71c03d

View File

@@ -355,7 +355,12 @@ public class TippligaSQLConnector {
'{{remainingHours}}' AS remaining_hours,
b.user_id,
u.username,
pf.pf_handynummer,
CASE
WHEN SUBSTR(pf.pf_handynummer, 1, 2) = '00' THEN pf.pf_handynummer
WHEN SUBSTR(pf.pf_handynummer, 1, 1) = '+' THEN CONCAT('00', SUBSTR(pf.pf_handynummer, 2))
WHEN SUBSTR(pf.pf_handynummer, 1, 2) = '01' THEN CONCAT('0049', SUBSTR(pf.pf_handynummer, 2))
ELSE ''
END AS pf_handynummer,
count(*) AS missing_bets
FROM delivery_date_next_day d
LEFT JOIN phpbb_footb_matches m