Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CONSTRUCTOR FUNCTION Obj$Campaign(id NUMBER DEFAULT NULL) RETURN SELF AS RESULT AS
- BEGIN
- IF id IS NULL THEN RETURN; END IF;
- WITH a AS (
- SELECT cc.campaign_id,
- cc.client_id,
- cc.campaign_script,
- cc.object_id,
- cc.type_id,
- cc.status_id,
- oc.obj_code,
- cc.campaign_code,
- cc.campaign_begin,
- cc.campaign_end,
- cc.campaign_next,
- cc.campaign_step,
- oc.obj_title,
- cb.node_id,
- cb.item_id,
- cb.channel_id
- FROM client_basket cb ,
- client_campaign cc,
- object_catalogue oc
- WHERE cc.object_id = cb.item_id (+)
- AND cc.campaign_script = oc.obj_id (+)
- AND cc.campaign_id = id
- )
- SELECT a.campaign_id,
- a.client_id,
- a.campaign_script,
- a.object_id,
- a.type_id,
- a.status_id,
- a.obj_code,
- a.campaign_code,
- a.campaign_begin,
- a.campaign_end,
- a.campaign_next,
- a.campaign_step,
- a.obj_title,
- a.node_id,
- a.item_id,
- a.channel_id,
- NVL(c.node_code,'&'||'nbsp;'),
- NVL(c.node_name,'&'||'nbsp;')
- INTO SELF.ID,
- SELF.clientID,
- SELF.scriptID,
- SELF.objectID,
- SELF.TYPE,
- SELF.status,
- SELF.scriptCode,
- SELF.code,
- SELF.startdate,
- SELF.enddate,
- SELF.nextdate,
- SELF.state,
- SELF.name,
- SELF.itemNodeID,
- SELF.itemID,
- SELF.channelID,
- SELF.itemCode,
- SELF.itemName
- FROM a, catalogue c
- WHERE a.node_id = c.node_id (+);
- RETURN;
- END Obj$Campaign;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement