服务人员部门银行网点查询SQL
1.18 KB
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
--862203 机构
--031829 部门
select * from department_info di where di.channel_type='02';
select * from rn_dept_servicer rd ,department_info di
where rd.dept_no=di.dept_no
and di.channel_type='02'
;
--满足条件的个险续收人员
select si.dept_no,si.emp_no,ro.market_flag, ro.bank_flag,ro.agent_flag,di.branch_code from staff_info si,department_info di,renewal_staff_info_other ro
where si.dept_no=di.dept_no
and si.emp_no=ro.emp_no
and di.channel_type='07'
and si.is_valid='Y'
and ro.market_flag='Y'
and di.branch_code = '861100';
--满足条件的部门
select * from department_info di
where di.is_valid='Y'
and di.branch_code='866404';
--满足条件的银代续收人员
select si.dept_no,si.emp_no,ro.market_flag, ro.bank_flag,ro.agent_flag from staff_info si,department_info di,renewal_staff_info_other ro
where si.dept_no=di.dept_no
and si.emp_no=ro.emp_no
and di.channel_type='07'
and si.is_valid='Y'
and ro.bank_flag='Y';
--满足条件的银行网点
select * from department_info di
where di.is_valid='Y'
and di.channel_type='02'
and di.branch_code='866404'
and di.dept_no='0256601011001011';
select * from gras_dept_servicer;
select * from gras_bank_emp ;