DBA Data[Home] [Help]

APPS.AS_AUTOCREATE_OPP SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 33

       SELECT sales_lead_id
       FROM as_sales_leads l
       WHERE assign_to_salesforce_id in
	            (SELECT salesforce_id
	             FROM as_salesforce_v
	             WHERE role_type_code <> 'TELESALES')
             and sales_lead_id not in
                 (SELECT sales_lead_id
                  FROM as_sales_lead_opportunity);
Line: 45

              Select     force.resource_id
              From JTF_RS_RESOURCE_EXTNS force, JTF_RS_ROLE_RELATIONS rrel
			   ,JTF_RS_ROLES_B roleb, FND_User fnd_user
              Where force.user_id = fnd_user.user_id
              and fnd_user.user_id = p_user_id
	         and force.category in ('EMPLOYEE','PARTY')
		    and force.resource_id = rrel.role_resource_id
		    and rrel.role_resource_type = 'RS_INDIVIDUAL'
		    and rrel.role_id = roleb.role_id
		    and roleb.role_type_code in ('SALES','TELESALES','FIELDSALES','PRM')
		    and rownum = 1;
Line: 58

SELECT group_id
		  FROM jtf_rs_group_members GRPMEM
		 WHERE resource_id = p_salesforce_id
		   AND delete_flag = 'N'
		   AND EXISTS
			(SELECT 'X'
			   FROM jtf_rs_role_relations REL
			  WHERE role_resource_type = 'RS_GROUP_MEMBER'
			    AND delete_flag = 'N'
			    AND sysdate between REL.start_date_active and nvl(REL.end_date_active,sysdate)
			    AND REL.role_resource_id = GRPMEM.group_member_id
			    AND role_id IN (SELECT role_id FROM jtf_rs_roles_b WHERE role_type_code IN ('SALES','TELESALES','FIELDSALES','PRM')));