Advertisement
aadddrr

INSERT POLICY PRODUCT

May 25th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. INSERT INTO m_policy_product
  2.         (user_role_id, sub_ctgr_product_id,
  3.         active, active_datetime,
  4.         create_datetime, create_user_id, update_datetime, update_user_id, version)
  5.     SELECT A.user_role_id, B.sub_ctgr_product_id,
  6.         'Y', '20170526010101',
  7.         '20170526010101', -2, '20170526010101', -2, 0
  8.     FROM t_user_role A, m_sub_ctgr_product B
  9.     WHERE B.sub_ctgr_product_id NOT IN (
  10.         SELECT C.sub_ctgr_product_id
  11.         FROM m_policy_product C
  12.         WHERE C.user_role_id = A.user_role_id
  13.     )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement