Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-opsdoc
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9a394f9d
authored
May 17, 2022
by
向延琳
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改sql
1 parent
ee4a3bb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
1.7.0_五月/二押警情迁移.sql
1.7.0_五月/二押警情迁移.sql
View file @
9a394f9
...
...
@@ -26,7 +26,7 @@ INSERT INTO d_alarm_second_data_copy (id, sn, type, name, alarm_time, alarm_addr
leave_time
,
stay_time
,
lng
,
lat
,
event_time
,
del_flag
,
unique_flag
,
create_time
,
update_time
)
select
id
,
sn
,
dasd
.
sn
,
type
,
name
,
alarm_time
,
...
...
@@ -45,8 +45,10 @@ from d_alarm_second_data dasd
-- 老数据迁移写入
use
neshield
;
select
count
(
1
)
from
t_alarm_second_data
;
INSERT
INTO
t_alarm_second_data
(
sn
,
type
,
name
,
alarm_time
,
alarm_address
,
leave_time
,
stay_time
,
lng
,
lat
,
event_time
,
del_flag
,
unique_flag
,
leave_time
,
stay_time
,
lng
,
lat
,
event_time
,
unique_flag
,
created_date
,
updated_date
)
select
sn
,
type
,
...
...
@@ -58,15 +60,13 @@ select sn,
lng
,
lat
,
event_time
,
del_flag
,
unique_flag
,
CURRENT_TIMESTAMP
,
CURRENT_TIMESTAMP
from
d_alarm_second_data_copy
dasdc
where
dasdc
.
del_flag
=
1
;
use
neshield
;
INSERT
INTO
t_alarm_second_data
(
sn
,
type
,
name
,
alarm_time
,
alarm_address
,
leave_time
,
stay_time
,
lng
,
lat
,
event_time
,
del_flag
,
unique_flag
,
leave_time
,
stay_time
,
lng
,
lat
,
event_time
,
unique_flag
,
created_date
,
updated_date
,
del_flag
)
select
sn
,
type
,
...
...
@@ -78,7 +78,6 @@ select sn,
lng
,
lat
,
event_time
,
del_flag
,
unique_flag
,
CURRENT_TIMESTAMP
,
CURRENT_TIMESTAMP
,
...
...
@@ -92,7 +91,7 @@ update t_alarm_second_data tasd
SET
tasd
.
vd_id
=
tvd
.
id
,
tasd
.
created_by
=
tv
.
created_by
where
tvd
.
del_flag
=
0
and
tvd
.
bind_status
=
1
;
and
tvd
.
bind_status
=
1
and
tasd
.
del_flag
=
0
;
use
newgps
;
...
...
@@ -107,7 +106,7 @@ create table d_alarm_second_data_near_rel_copy
INSERT
INTO
d_alarm_second_data_near_rel_copy
(
id
,
second_data_id
,
near_second_id
)
select
id
,
select
dasdnr
.
id
,
second_data_id
,
near_second_id
from
d_alarm_second_data_near_rel
dasdnr
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment