test4.txt
1.32 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
select count(*) from bsth_c_s_ttinfo_detail
select * from bsth_c_s_ttinfo_detail
select * from bsth_c_s_ttinfo_detail where zdz_code is null;
select * from bsth_c_station;
select * from bsth_c_car_park;
update bsth_c_s_ttinfo_detail a
set a.qdz_code = (select station_cod from bsth_c_station b where a.qdz = b.id)
where a.bc_type <> 'out'
update bsth_c_s_ttinfo_detail a
set a.qdz_name = (select station_name from bsth_c_station b where a.qdz = b.id)
where a.bc_type <> 'out'
update bsth_c_s_ttinfo_detail a
set a.zdz_code = (select station_cod from bsth_c_station b where a.zdz = b.id)
where a.bc_type <> 'in'
update bsth_c_s_ttinfo_detail a
set a.zdz_name = (select station_name from bsth_c_station b where a.zdz = b.id)
where a.bc_type <> 'in'
update bsth_c_s_ttinfo_detail a
set a.qdz_code = (select park_code from bsth_c_car_park b where a.tcc = b.id)
where a.bc_type = 'out'
update bsth_c_s_ttinfo_detail a
set a.qdz_name = (select park_name from bsth_c_car_park b where a.tcc = b.id)
where a.bc_type = 'out'
update bsth_c_s_ttinfo_detail a
set a.zdz_code = (select park_code from bsth_c_car_park b where a.tcc = b.id)
where a.bc_type = 'in'
update bsth_c_s_ttinfo_detail a
set a.zdz_name = (select park_name from bsth_c_car_park b where a.tcc = b.id)
where a.bc_type = 'in'
commit;