DBA Data[Home] [Help]

APPS.BIL_BI_PIPELINE_F_PKG dependencies on AS_LEADS_LOG

Line 1291: SELECT /*+ index_ffs(as_leads_log) parallel_index(as_leads_log) */ count(*) cnt

1287: --------------------------------------------------------------
1288:
1289: SELECT SUM(cnt) into l_opty_cnt FROM
1290: (
1291: SELECT /*+ index_ffs(as_leads_log) parallel_index(as_leads_log) */ count(*) cnt
1292: FROM as_leads_log
1293: UNION ALL
1294: SELECT -cnt FROM
1295: (SELECT /*+ index_ffs(as_leads_all) parallel_index(as_leads_all) */ count(*) cnt FROM as_leads_all)

Line 1292: FROM as_leads_log

1288:
1289: SELECT SUM(cnt) into l_opty_cnt FROM
1290: (
1291: SELECT /*+ index_ffs(as_leads_log) parallel_index(as_leads_log) */ count(*) cnt
1292: FROM as_leads_log
1293: UNION ALL
1294: SELECT -cnt FROM
1295: (SELECT /*+ index_ffs(as_leads_all) parallel_index(as_leads_all) */ count(*) cnt FROM as_leads_all)
1296: );

Line 1730: --we want to make sure that there is data in as_leads_log

1726: );
1727: END IF;
1728:
1729:
1730: --we want to make sure that there is data in as_leads_log
1731: --for the day that we want to build the baseline on
1732: --this is true in any case, not only wher p_start_date the MIN date in as_leads_log
1733: --for this purpose, we replace l_start_date with
1734: --the closest date in as_leads_log from l_start_date,

Line 1732: --this is true in any case, not only wher p_start_date the MIN date in as_leads_log

1728:
1729:
1730: --we want to make sure that there is data in as_leads_log
1731: --for the day that we want to build the baseline on
1732: --this is true in any case, not only wher p_start_date the MIN date in as_leads_log
1733: --for this purpose, we replace l_start_date with
1734: --the closest date in as_leads_log from l_start_date,
1735: --that is in the range we are collecting for
1736: --if there is data for l_start_date itself, we will build baseline on l_start_date

Line 1734: --the closest date in as_leads_log from l_start_date,

1730: --we want to make sure that there is data in as_leads_log
1731: --for the day that we want to build the baseline on
1732: --this is true in any case, not only wher p_start_date the MIN date in as_leads_log
1733: --for this purpose, we replace l_start_date with
1734: --the closest date in as_leads_log from l_start_date,
1735: --that is in the range we are collecting for
1736: --if there is data for l_start_date itself, we will build baseline on l_start_date
1737:
1738:

Line 1744: from as_leads_log

1740: BEGIN
1741:
1742: SELECT MIN(last_update_date)
1743: into l_min_lead_date
1744: from as_leads_log
1745: WHERE last_update_date between l_start_date and l_date;
1746:
1747:
1748: EXCEPTION

Line 1896: --we want to make sure that there is data in as_leads_log

1892: IF l_date - (l_last_run+1)> 3 THEN
1893:
1894: l_small_gap := FALSE;
1895:
1896: --we want to make sure that there is data in as_leads_log
1897: --for the day that we want to build the baseline on
1898: --this is true in any case, not only wher p_start_date the MIN date in as_leads_log
1899: --for this purpose, we replace l_start_date with
1900: --the closest date in as_leads_log from l_start_date,

Line 1898: --this is true in any case, not only wher p_start_date the MIN date in as_leads_log

1894: l_small_gap := FALSE;
1895:
1896: --we want to make sure that there is data in as_leads_log
1897: --for the day that we want to build the baseline on
1898: --this is true in any case, not only wher p_start_date the MIN date in as_leads_log
1899: --for this purpose, we replace l_start_date with
1900: --the closest date in as_leads_log from l_start_date,
1901: --that is in the range we are collecting for
1902: --if there is data for l_start_date itself, we will build baseline on l_start_date

Line 1900: --the closest date in as_leads_log from l_start_date,

1896: --we want to make sure that there is data in as_leads_log
1897: --for the day that we want to build the baseline on
1898: --this is true in any case, not only wher p_start_date the MIN date in as_leads_log
1899: --for this purpose, we replace l_start_date with
1900: --the closest date in as_leads_log from l_start_date,
1901: --that is in the range we are collecting for
1902: --if there is data for l_start_date itself, we will build baseline on l_start_date
1903:
1904:

Line 1910: from as_leads_log

1906: BEGIN
1907:
1908: SELECT MIN(last_update_date)
1909: into l_min_lead_date
1910: from as_leads_log
1911: WHERE last_update_date between l_last_run+1 and l_date;
1912:
1913:
1914: EXCEPTION

Line 4580: FROM as_leads_log leadlog1

4576: l_report_date report_date,
4577: l_report_start start_date,
4578: l_report_end end_date
4579: ,leadlog1.lead_id, max(leadlog1.log_id) max_id
4580: FROM as_leads_log leadlog1
4581: -- ( -- alias gapdays
4582: -- SELECT report_date,
4583: -- LEAST(ent_year_start_date, week_start_date) start_date,
4584: -- GREATEST(ent_year_end_date,week_end_date) end_date

Line 4593: as_leads_log llog,

4589: WHERE leadlog1.last_update_date < l_report_date+1
4590: GROUP BY lead_id, --gapdays.report_date, gapdays.start_date, gapdays.end_date
4591: l_report_date, l_report_start, l_report_end
4592: ) maxlead,
4593: as_leads_log llog,
4594: as_statuses_b status1
4595: WHERE maxlead.max_id = llog.log_id
4596: and status1.status_Code = llog.status_Code
4597: and llog.decision_date >= g_global_start_date

Line 4783: as_leads_log llog,

4779: DECODE(GREATEST(TRUNC(llog.last_update_date), p_coll_start),TRUNC(llog.last_update_date),
4780: TRUNC(llog.last_update_date),time.end_date)
4781: ,llog.lead_id ORDER BY llog.log_id desc) log_id_rank
4782: FROM
4783: as_leads_log llog,
4784: bil_bi_time time
4785: WHERE
4786: llog.last_update_date >= p_start_date AND llog.last_update_date+0 < p_end_date
4787: AND(llog.last_update_date >= time.start_date and llog.last_update_date < time.end_date+1)

Line 4849: , as_leads_log leadlog

4845: ) maxlog
4846: where log_id_rank = 1
4847:
4848: ) linelog
4849: , as_leads_log leadlog
4850: WHERE linelog.lead_id=leadlog.lead_id
4851: AND creditlog.lead_line_id=linelog.lead_line_id
4852: AND linelog.lead_id = creditlog.lead_id
4853:

Line 4904: , as_leads_log leadlog

4900: where log_id_rank = l_rank
4901:
4902: ) creditlog
4903: , as_lead_lines_log linelog
4904: , as_leads_log leadlog
4905: WHERE linelog.lead_id=leadlog.lead_id
4906: AND creditlog.lead_line_id=linelog.lead_line_id
4907: AND linelog.lead_id = creditlog.lead_id
4908:

Line 5012: , as_leads_log leadlog

5008: , NVL(linelog.forecast_date, leadlog.decision_date)
5009: FROM BIL_BI_OPDTL_DENLOG_TMP tmp
5010: ,as_sales_credits_log creditlog
5011: , as_lead_lines_log linelog
5012: , as_leads_log leadlog
5013: , as_statuses_b status
5014: , as_leads_all lead
5015: WHERE tmp.rev_flag = 'N'
5016: and tmp.lead_log_id = leadlog.log_id

Line 5108: as_leads_log llog,

5104: DECODE(GREATEST(TRUNC(llog.last_update_date), p_coll_start),TRUNC(llog.last_update_date),
5105: TRUNC(llog.last_update_date),time.end_date)
5106: ,llog.lead_id ORDER BY llog.log_id desc) log_id_rank
5107: FROM
5108: as_leads_log llog,
5109: bil_bi_time time
5110: WHERE
5111: llog.last_update_date >= p_start_date AND llog.last_update_date < p_end_date
5112: AND(llog.last_update_date >= time.start_date and llog.last_update_date < time.end_date+1)

Line 5176: , as_leads_log leadlog

5172: ) maxlog
5173: where log_id_rank = 1
5174:
5175: ) linelog
5176: , as_leads_log leadlog
5177: WHERE linelog.lead_id=leadlog.lead_id
5178: AND creditlog.lead_line_id=linelog.lead_line_id
5179: AND linelog.lead_id = creditlog.lead_id
5180:

Line 5233: , as_leads_log leadlog

5229: where log_id_rank = l_rank
5230:
5231: ) creditlog
5232: , as_lead_lines_log linelog
5233: , as_leads_log leadlog
5234: WHERE linelog.lead_id=leadlog.lead_id
5235: AND creditlog.lead_line_id=linelog.lead_line_id
5236: AND linelog.lead_id = creditlog.lead_id
5237:

Line 5326: , as_leads_log leadlog

5322: , NVL(linelog.forecast_date, leadlog.decision_date)
5323: FROM BIL_BI_OPDTL_DENLOG_TMP tmp
5324: ,as_sales_credits_log creditlog
5325: , as_lead_lines_log linelog
5326: , as_leads_log leadlog
5327: , as_statuses_b status
5328: , as_leads_all lead
5329: WHERE tmp.rev_flag = 'N'
5330: and tmp.lead_log_id = leadlog.log_id

Line 6249: FROM as_leads_log leadlog1,

6245: FROM
6246: ( -- alias maxlead
6247: SELECT gapdays.report_date, gapdays.start_date, gapdays.end_date,
6248: leadlog1.lead_id, max(leadlog1.log_id) max_id
6249: FROM as_leads_log leadlog1,
6250: ( -- alias gapdays
6251: SELECT report_date,
6252: LEAST(year.start_date, week.start_date) start_date,
6253: GREATEST(year.end_date,week.end_date) end_date

Line 6265: as_leads_log llog

6261: ) gapdays
6262: WHERE leadlog1.last_update_date < gapdays.report_date+1
6263: GROUP BY lead_id, gapdays.report_date, gapdays.start_date, gapdays.end_date
6264: ) maxlead,
6265: as_leads_log llog
6266: WHERE maxlead.max_id = llog.log_id
6267: and llog.decision_date >= p_first_fact_run
6268: and llog.decision_date <= l_limit_date --added by annsrini --fix for bug 5953589
6269: AND llog.decision_date between maxlead.start_date and maxlead.end_date