-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathodi_expr.sql
104 lines (104 loc) · 2.48 KB
/
odi_expr.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
select
a.name map_name,
b.name comp_name,
c.name comp_type,
e.name attr_name,
to_char(substr(f.txt,1,3000)) expr,
g.folder_name,
a.global_id
from
snp_mapping a,
snp_map_comp b,
snp_map_comp_type c,
snp_map_cp d,
snp_map_attr e,
snp_map_expr f,
snp_folder g
where
g.i_folder = a.i_folder and
b.i_owner_mapping = a.i_mapping and
c.i_map_comp_type = b.i_map_comp_type and
d.i_owner_map_comp = b.i_map_comp and
e.i_owner_map_cp = d.i_map_cp and
f.i_owner_map_attr = e.i_map_attr and
upper(f.txt) like '%\%%' escape '\' and
g.folder_name != 'Sandbox'
union all
select
a.name,
b.name,
c.name,
null,
to_char(substr(f.txt,1,3000)),
g.folder_name,
a.global_id
from
snp_mapping a,
snp_map_comp b,
snp_map_comp_type c,
snp_map_cp d,
snp_map_prop e,
snp_map_expr f,
snp_folder g
where
g.i_folder = a.i_folder and
b.i_owner_mapping = a.i_mapping and
c.i_map_comp_type = b.i_map_comp_type and
d.i_owner_map_comp = b.i_map_comp and
e.i_map_cp = d.i_map_cp and
f.i_owner_map_prop = e.i_map_prop and
upper(f.txt) like '%\%%' escape '\' and
g.folder_name != 'Sandbox'
union all
select
a.name,
b.name,
c.name,
null,
to_char(substr(e.txt,1,3000)),
g.folder_name,
a.global_id
from
snp_mapping a,
snp_map_comp b,
snp_map_comp_type c,
snp_map_prop d,
snp_map_expr e,
snp_folder g
where
g.i_folder = a.i_folder and
b.i_owner_mapping = a.i_mapping and
c.i_map_comp_type = b.i_map_comp_type and
d.i_map_comp = b.i_map_comp and
e.i_owner_map_prop = d.i_map_prop and
upper(e.txt) like '%\%%' escape '\' and
g.folder_name != 'Sandbox'
union all
select
a.name,
b.name,
c.name,
e.name,
to_char(substr(f.txt,1,3000)),
g.folder_name,
a.global_id
from
snp_mapping a,
snp_map_comp b,
snp_map_comp_type c,
snp_map_cp d,
snp_map_attr e,
snp_map_prop p,
snp_map_expr f,
snp_folder g
where
g.i_folder = a.i_folder and
b.i_owner_mapping = a.i_mapping and
c.i_map_comp_type = b.i_map_comp_type and
b.i_map_comp = d.i_owner_map_comp and
d.i_map_cp = e.i_owner_map_cp and
e.i_map_attr = p.i_map_attr and
f.i_owner_map_prop = p.i_map_prop and
upper(f.txt) like '%\%%' escape '\' and
g.folder_name != 'Sandbox'
order by 1,2,3,4