INSERT INTO SPECIAL_CARD (ACCEPT_NO, TASK_ID, SPECIAL_TYPE,GROUP_NO) VALUES (#{accept_Number},(SELECT TASK_ID FROM GROUP_NO WHERE GROUP_NO.GROUP_NO=SUBSTR(#{accept_Number},1,8)),0,SUBSTR(#{accept_Number},1,8))
INSERT INTO SPECIAL_CARD (ACCEPT_NO, TASK_ID, SPECIAL_TYPE,GROUP_NO) VALUES (#{accept_Number},(SELECT TASK_ID FROM GROUP_NO WHERE GROUP_NO.GROUP_NO=SUBSTR(#{accept_Number},1,8)),0,SUBSTR(#{accept_Number},1,8))
SELECT NAME,ID_NO,PROD_CARD_T.ACCEPT_NO,SPECIAL_TYPE FROM (select ACCEPT_NO,NAME,ID_NO from prod_card_t@prod_link) PROD_CARD_T
SELECT NAME,ID_NO AS idNo,PROD_CARD_T.ACCEPT_NO AS acceptNo,SPECIAL_TYPE AS specialType FROM (select ACCEPT_NO,NAME,ID_NO from prod_card_t@prod_link) PROD_CARD_T
LEFT JOIN (select ACCEPT_NO,SPECIAL_TYPE from SPECIAL_CARD)SPECIAL_CARD ON SPECIAL_CARD.ACCEPT_NO = PROD_CARD_T.ACCEPT_NO
LEFT JOIN (select ACCEPT_NO,SPECIAL_TYPE from SPECIAL_CARD)SPECIAL_CARD ON SPECIAL_CARD.ACCEPT_NO = PROD_CARD_T.ACCEPT_NO
WHERE PROD_CARD_T.ID_NO =#{idNo} OR PROD_CARD_T.ACCEPT_NO =#{acceptNo}
WHERE PROD_CARD_T.ID_NO =#{idNo} OR PROD_CARD_T.ACCEPT_NO =#{idNo}