-- ====================================================================
-- Import mapari kituri (seturi cu componente multiple) in ARTICOLE_TERTI
-- Sursa: kituri site.csv
-- Data: 2026-03-20
-- Schema: VENDING (productie)
-- ====================================================================

-- Kit revizie grup Wittenborg 7100
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5002' sku, '2517572' codmat, 3 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5002' sku, '252538' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5002' sku, '094594' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);

-- Kit revizie garnituri grup Wittenborg 7100 originale
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5002-2331' sku, '251757' codmat, 3 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5002-2331' sku, '252538' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5002-2331' sku, '094594' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);

-- Kit revizie boiler Necta 300cc
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5003' sku, '098701' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5003' sku, '099059' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5003' sku, '254711' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5003' sku, '252538' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5003' sku, '095624' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);

-- Kit revizie garnituri boiler Necta Astro Spazio 600cc
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5004-5988' sku, 'DV099748' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5004-5988' sku, '252538' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5004-5988' sku, '254711' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5004-5988' sku, '095624' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);

-- Kit revizie grup Necta 7gr
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5000' sku, '093167' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5000' sku, '252538' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5000' sku, '094611' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);

-- Kit revizie grup Necta 9gr
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5001' sku, '2517572' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5001' sku, '252538' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5001' sku, '094611' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);

-- Kit butoane selectie zahar Necta Astro Zenith
MERGE INTO ARTICOLE_TERTI t USING (SELECT '0V2071/250159/250158' sku, '0V2071' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '0V2071/250159/250158' sku, '250158' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '0V2071/250159/250158' sku, '250159' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);

-- Kit revizie grup Necta Opera/9100 D38
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5008890' sku, '252538' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5008890' sku, '094611' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5008890' sku, '093167' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);

-- Kit revizie grup Necta Opera/9100 D46
MERGE INTO ARTICOLE_TERTI t USING (SELECT 'VM515' sku, '251757' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT 'VM515' sku, '252538' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT 'VM515' sku, '094611' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT 'VM515' sku, '0V0782' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT 'VM515' sku, '254650' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);

-- Kit revizie boiler Necta/Wittenborg 600cc
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5004' sku, '099059' codmat, 3 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5004' sku, 'DV099748' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5004' sku, '254711' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5004' sku, '095624' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5004' sku, '252538' codmat, 1 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);

-- Kit revizie rasnita Necta
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5006' sku, '095840' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);
MERGE INTO ARTICOLE_TERTI t USING (SELECT '5006' sku, '0V3229' codmat, 2 cantitate_roa FROM DUAL) s ON (t.sku = s.sku AND t.codmat = s.codmat) WHEN MATCHED THEN UPDATE SET t.cantitate_roa = s.cantitate_roa, t.activ = 1, t.sters = 0, t.data_modif = SYSDATE WHEN NOT MATCHED THEN INSERT (sku, codmat, cantitate_roa, activ, sters, data_creare, data_modif, id_util_creare) VALUES (s.sku, s.codmat, s.cantitate_roa, 1, 0, SYSDATE, SYSDATE, -3);

COMMIT;
