ADRESE
This commit is contained in:
@@ -443,6 +443,7 @@ CREATE OR REPLACE PACKAGE BODY PACK_IMPORT_PARTENERI AS
|
||||
|
||||
-- 31.03.2026 - parser inteligent: split numar in bloc/scara/apart/etaj (fix ORA-12899 pe NUMAR max 10 chars)
|
||||
-- 08.04.2026 - fix: inserare virgule in strada inainte de comma-split (sc/ap/et nu se extrageau fara virgula)
|
||||
-- 08.04.2026 - fix: BLOC/NR regex require separator (fix false-positive on BLOCURI neighborhood name)
|
||||
PROCEDURE parseaza_adresa_semicolon(p_adresa_text IN VARCHAR2,
|
||||
p_judet OUT VARCHAR2,
|
||||
p_localitate OUT VARCHAR2,
|
||||
@@ -549,14 +550,14 @@ CREATE OR REPLACE PACKAGE BODY PACK_IMPORT_PARTENERI AS
|
||||
IF p_strada IS NOT NULL THEN
|
||||
v_token_upper := UPPER(p_strada);
|
||||
-- Extrage NR din strada
|
||||
IF REGEXP_LIKE(v_token_upper, '(\s)(NUMARUL|NUMAR|NR\.?)\s*(\S+)') THEN
|
||||
p_numar := TRIM(REGEXP_REPLACE(v_token_upper, '.*(\s)(NUMARUL|NUMAR|NR\.?)\s*(\S+).*', '\3', 1, 1));
|
||||
p_strada := TRIM(REGEXP_REPLACE(p_strada, '(\s)(NUMARUL|NUMAR|NR\.?)\s*\S+', '', 1, 1, 'i'));
|
||||
IF REGEXP_LIKE(v_token_upper, '(\s)(NUMARUL|NUMAR|NR\.?)[\s.]+(\S+)') THEN
|
||||
p_numar := TRIM(REGEXP_REPLACE(v_token_upper, '.*(\s)(NUMARUL|NUMAR|NR\.?)[\s.]+(\S+).*', '\3', 1, 1));
|
||||
p_strada := TRIM(REGEXP_REPLACE(p_strada, '(\s)(NUMARUL|NUMAR|NR\.?)[\s.]+\S+', '', 1, 1, 'i'));
|
||||
END IF;
|
||||
-- Extrage BLOC din strada
|
||||
IF REGEXP_LIKE(v_token_upper, '(\s)(BLOC|BL\.?)\s*(\S+)') THEN
|
||||
p_bloc := TRIM(REGEXP_REPLACE(v_token_upper, '.*(\s)(BLOC|BL\.?)\s*(\S+).*', '\3', 1, 1));
|
||||
p_strada := TRIM(REGEXP_REPLACE(p_strada, '(\s)(BLOC|BL\.?)\s*\S+', '', 1, 1, 'i'));
|
||||
IF REGEXP_LIKE(v_token_upper, '(\s)(BLOC|BL\.?)[\s.]+(\S+)') THEN
|
||||
p_bloc := TRIM(REGEXP_REPLACE(v_token_upper, '.*(\s)(BLOC|BL\.?)[\s.]+(\S+).*', '\3', 1, 1));
|
||||
p_strada := TRIM(REGEXP_REPLACE(p_strada, '(\s)(BLOC|BL\.?)[\s.]+\S+', '', 1, 1, 'i'));
|
||||
END IF;
|
||||
-- Re-read v_token_upper after BLOC removal may have changed p_strada
|
||||
v_token_upper := UPPER(p_strada);
|
||||
|
||||
Reference in New Issue
Block a user