Commit c1036d3b by 吴迪

【修改】修改数据库

parent 675d3ffd
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
b.address_description, b.address_description,
c.personname c.personname
FROM FROM
center_outer.dbo.branch a center_sync.dbo.branch a
LEFT JOIN codeagent b ON ltrim(rtrim(a.branch_code)) = ltrim(rtrim(b.id)) LEFT JOIN codeagent b ON ltrim(rtrim(a.branch_code)) = ltrim(rtrim(b.id))
LEFT JOIN center_outer.dbo.person c ON a.branch_contact = c.personid LEFT JOIN center_sync.dbo.person c ON a.branch_contact = c.personid
WHERE WHERE
ltrim(rtrim(branch_code)) = ltrim(rtrim(#{branchCode})) ltrim(rtrim(branch_code)) = ltrim(rtrim(#{branchCode}))
</select> </select>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
b.mail, b.mail,
b.website b.website
FROM FROM
center_outer.dbo.branch a center_sync.dbo.branch a
LEFT JOIN codeagent b ON ltrim(rtrim(a.branch_code)) = ltrim(rtrim(b.id)) LEFT JOIN codeagent b ON ltrim(rtrim(a.branch_code)) = ltrim(rtrim(b.id))
WHERE WHERE
ltrim(rtrim(a.branch_code)) &lt;&gt; '0000' ltrim(rtrim(a.branch_code)) &lt;&gt; '0000'
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
a.log_date, a.log_date,
b.login_date b.login_date
FROM FROM
center_outer.dbo.bulletin AS a center_sync.dbo.bulletin AS a
INNER JOIN center_outer.dbo.ean_upc AS b ON a.code = b.code INNER JOIN center_sync.dbo.ean_upc AS b ON a.code = b.code
WHERE WHERE
( (
DATEDIFF(DAY, login_date, getdate()) >= 7 DATEDIFF(DAY, login_date, getdate()) >= 7
...@@ -52,8 +52,8 @@ ...@@ -52,8 +52,8 @@
a.log_date, a.log_date,
b.login_date b.login_date
FROM FROM
center_outer.dbo.bulletin AS a center_sync.dbo.bulletin AS a
INNER JOIN center_outer.dbo.ean_upc AS b ON a.code = b.code INNER JOIN center_sync.dbo.ean_upc AS b ON a.code = b.code
WHERE WHERE
( (
DATEDIFF(DAY, login_date, getdate()) >= 7 DATEDIFF(DAY, login_date, getdate()) >= 7
...@@ -84,9 +84,9 @@ ...@@ -84,9 +84,9 @@
b.f_id, b.f_id,
b.logout_date b.logout_date
FROM FROM
center_outer.dbo.firm a center_sync.dbo.firm a
LEFT JOIN center_outer.dbo.ean_upc b ON a.f_id = b.f_id LEFT JOIN center_sync.dbo.ean_upc b ON a.f_id = b.f_id
LEFT JOIN center_outer.dbo.bulletin c ON c.code = b.code LEFT JOIN center_sync.dbo.bulletin c ON c.code = b.code
WHERE WHERE
a.f_id = #{eanUpcEntity.fId} a.f_id = #{eanUpcEntity.fId}
AND b.code = #{eanUpcEntity.code} AND b.code = #{eanUpcEntity.code}
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
FROM FROM
firm a firm a
LEFT JOIN ean_upc b ON a.f_id = b.f_id LEFT JOIN ean_upc b ON a.f_id = b.f_id
LEFT JOIN center_outer.dbo.bulletin c ON c.code = b.code LEFT JOIN center_sync.dbo.bulletin c ON c.code = b.code
WHERE WHERE
a.f_id = #{f_id} a.f_id = #{f_id}
AND b.code = #{code} AND b.code = #{code}
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
FIRM_NAME_NOW, FIRM_NAME_NOW,
AUDIT_DATE AUDIT_DATE
FROM FROM
center_outer.dbo.CHANGE_HISTORY center_sync.dbo.CHANGE_HISTORY
WHERE WHERE
(FIRM_NAME &lt;&gt; FIRM_NAME_now) (FIRM_NAME &lt;&gt; FIRM_NAME_now)
AND ( AND (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment