sql用select查询语句更新另一个表的数据怎么弄,大神帮帮忙
SELECT t_d_SwipeRecord.f_RecID AS '序号', t_d_SwipeRecord.f_CardNO AS '卡号',
t_b_Consumer.f_ConsumerNO AS '工号',
t_b_Consumer.f_ConsumerName AS '姓名',
t_b_Group.f_GroupName AS '部门',
t_d_SwipeRecord.f_ReadDate AS '时间',
t_b_Reader.f_ReaderName AS '地点',
CASE WHEN t_d_SwipeRecord.f_Character =1 THEN '允许通过' ELSE '禁止通过' END AS '通过',
CASE WHEN t_d_SwipeRecord.f_InOut=0 THEN '出门' ELSE '进门' END AS '进出',
t_b_Door.f_DoorName AS '门名称',
t_d_SwipeRecord.f_RecordAll AS '单个记录的原始数据'
FROM (((t_d_SwipeRecord INNER JOIN t_b_Consumer ON ( t_b_Consumer.f_ConsumerID = t_d_SwipeRecord.f_ConsumerID))
LEFT JOIN t_b_Reader on ( t_b_Reader.f_ReaderID = t_d_SwipeRecord.f_ReaderID) )
LEFT JOIN t_b_Group ON (t_b_Consumer.f_GroupID = t_b_Group.f_GroupID ))
LEFT JOIN t_b_Door ON (t_b_Door.f_ControllerID = t_b_Reader.f_ControllerID
and ((f_ControllerSN>400000000 and t_b_Door.f_DoorNO = t_b_Reader.f_ReaderNO)
or (f_ControllerSN<400000000 and (((t_b_Door.f_DoorNO*2) = t_b_Reader.f_ReaderNO) or ((t_b_Door.f_DoorNO*2-1) = t_b_Reader.f_ReaderNO))))
)
WHERE ( ((((f_RecOption - (f_RecOption % 2)) / 2) % 2) =0))
我通过数据库导入数据的方法通过上面的查询语句新建了一个表sjcx,但是表t_d_SwipeRecord的数据更新的时候表sjcx的数据不会发生变化,怎么样让表sjcx在表t_d_SwipeRecord更新的时候自动运行上面那段语句实现同步更新