-
Notifications
You must be signed in to change notification settings - Fork 7
/
R12 Data Validation Queries.SQL
52 lines (48 loc) · 2.25 KB
/
R12 Data Validation Queries.SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--SUPPLIERS--
SELECT --count(*)
vendor_name, segment1, match_option, decode(inspection_required_flag, 'Y', '4-Way', decode(receipt_required_flag, 'Y', '3-Way', '2-Way')) match_type,enabled_flag
FROM apps.ap_suppliers where creation_date < '01-AUG-2014';
--CUSTOMERS--
--CUSTOMERS--
--select count(*)
--from (
select --hzca.*
hzp.party_number, hzp.party_name, decode(hzp.country, 'US', hzp.state, hzp.province) location, hzca.account_number, hzca.status
--hzp.party_name, hzp.party_id, hzp.party_type, hzca.account_number ,hzca.status cust_account_status
from apps.hz_parties hzp
, apps.hz_cust_accounts hzca
where hzp.party_id = hzca.party_id
and hzca.creation_date < '01-JUL-2014'
--and hzp.party_number = '1004'
--) a
--group by cust_account_status
;
--EXPENDITURES--
select count(*) from apps.pa_expenditure_items_all where creation_date <'01-JUL-2014'
;
--ASSETS--
select fa.asset_number, fa.description, fb.book_type_code, fb.cost, fb.deprn_method_code, fb.life_in_months from apps.fa_additions fa, apps.fa_books fb where fa.asset_id = fb.asset_id and fa.creation_date < '01-JUL-2014' and fb.last_update_date < '01-JUL-2014';
;
select count(*) from apps.fa_additions fa where creation_date < '01-JUL-2014';
---BUDGETS---
select pa_cost_budgets.segment1 proj_num
,pa_cost_budgets.burdened_cost cost_budget
,pa_rev_budgets.revenue revenue_budget
from (select pbv.budget_version_id, ppa.segment1, pbv.burdened_cost, ppa.creation_date
from apps.pa_budget_versions pbv
,apps.pa_projects_all ppa
where pbv.project_id = ppa.project_id
and pbv.budget_status_code = 'W'
and pbv.budget_type_code = 'AC'
) pa_cost_budgets
,(select pbv.budget_version_id, ppa.segment1, pbv.revenue
from apps.pa_budget_versions pbv
,apps.pa_projects_all ppa
where pbv.project_id = ppa.project_id
and pbv.budget_status_code = 'W'
and pbv.budget_type_code = 'AR'
) pa_rev_budgets
where pa_cost_budgets.segment1 = pa_rev_budgets.segment1
--and pa_cost_budgets.segment1 = '2601035';
and pa_cost_budgets.creation_date < '01-JUL-2014'
order by pa_cost_budgets.segment1 asc;