DBA Data[Home] [Help]

APPS.PV_BATCH_ASSIGN_PUB SQL Statements

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

Line: 74

          SELECT a.lead_id, a.description
          FROM   as_leads_all a,
                 pv_lead_workflows b,
	         pv_channel_types c,
                 as_statuses_b d
          WHERE a.channel_code                = c.channel_lookup_code
          AND   c.channel_lookup_type         = 'SALES_CHANNEL'
          AND   c.indirect_channel_flag       = 'Y'
          AND   a.lead_id                     = b.lead_id (+)
          AND   b.entity (+)                  = 'OPPORTUNITY'
          AND   b.latest_routing_flag (+)     = 'Y'
          AND   a.status		      = d.status_code
	  AND   d.opp_open_status_flag        = 'Y'
          AND   a.last_update_date	      < sysdate - pc_oppty_timeout
	  AND   a.creation_date 	      >= NVL(pc_fromdate, SYSDATE - 36500)
          AND  (b.routing_status is null OR
                b.routing_status IN ('RECYCLED','WITHDRAWN'));
Line: 95

          SELECT a.lead_id, a.description
          FROM as_leads_all a, pv_lead_workflows b,
               pv_channel_types c,hz_party_sites d,
               hz_locations e, as_statuses_b f
          WHERE a.channel_code               = c.channel_lookup_code
          AND   a.address_id                 = d.party_site_id
          AND   d.location_id                = e.location_id
	  AND   d.status 		     IN ('A','I')
          AND   c.channel_lookup_type        = 'SALES_CHANNEL'
          AND   c.indirect_channel_flag      = 'Y'
          AND   a.lead_id                    = b.lead_id (+)
          AND   b.entity (+)                 = 'OPPORTUNITY'
          AND   b.latest_routing_flag (+)    = 'Y'
          AND   a.status		     = f.status_code
	  AND   f.opp_open_status_flag       = 'Y'
          AND   e.country                    = pc_country
          AND   a.last_update_date	      < sysdate - pc_oppty_timeout
	  AND   a.creation_date 	      >= NVL(pc_fromdate, SYSDATE - 36500)
          AND  (b.routing_status is null OR
                b.routing_status IN ('RECYCLED','WITHDRAWN'));
Line: 117

          SELECT extn.category,
                 extn.resource_id
          FROM   fnd_user fuser,
                 jtf_rs_resource_extns extn
          WHERE  fuser.user_name = pc_username
          AND    fuser.user_id   = extn.user_id;
Line: 149

   l_selected_rule_id	       NUMBER;
Line: 279

			pv_opp_match_pub.Opportunity_Selection(
			p_api_version		 => l_api_version_number,
			p_init_msg_list          => FND_API.G_FALSE,
			p_commit                 => FND_API.G_FALSE,
			p_validation_level       => FND_API.G_VALID_LEVEL_FULL,
			p_entity_id              => l_lead_id,
			p_entity                 => 'LEAD',
			p_user_name              => p_username,
			p_resource_id            => l_resource_id,
			x_selected_rule_id       => l_selected_rule_id,
			x_matched_partner_count  => l_partner_count,
			x_failure_code           => l_failure_code,
			x_return_status          => l_return_status,
			x_msg_count              => l_msg_count,
			x_msg_data               => l_msg_data
			);
Line: 319

                         l_selected_rule_id || 'is :' || l_partner_count);