MERGE INTO PRIORITY_LEAGUES M
USING (
SELECT DISTINCT COMP_NAME AS COMP_NAME FROM LIVE_MATCHES_TZ
) LM ON (LM.COMP_NAME=M.SUB_LIST)
WHEN NOT MATCHED THEN
INSERT
(
M.SUB_LIST,
M.PRIORITY,
M.SPORT,
M.CREATED
)
VALUES
(
LM.COMP_NAME,
P_PRIORITY,
p_sport_s,
SYSDATE
);
COMMIT;
I need to prevent inserting null if value M.SUB_LIST is null. I set m.sub_list is nullable , but how can i prevent to insert null.
Thanks !!