{"id":975,"date":"2021-06-08T15:52:05","date_gmt":"2021-06-08T07:52:05","guid":{"rendered":"http:\/\/www.haoht.com.cn\/?p=975"},"modified":"2021-06-29T11:57:58","modified_gmt":"2021-06-29T03:57:58","slug":"%e5%90%88%e5%90%8c%e6%b6%88%e6%81%af%e6%8f%90%e9%86%92%e6%95%b0%e6%8d%ae%e5%ba%93%e8%a1%a8%e5%8f%98%e6%9b%b4","status":"publish","type":"post","link":"http:\/\/www.haoht.com.cn\/975\/","title":{"rendered":"\u5408\u540c\u6d88\u606f\u63d0\u9192\u6570\u636e\u5e93\u8868\u53d8\u66f4"},"content":{"rendered":"
— \u68c0\u6d4b\u6700\u8fd1\u4e24\u4e2a\u6708\u6d88\u606f\u8868\uff0c\u5982\u679c\u6709\uff0c\u5219\u68c0\u6d4b\u662f\u5426 C_SYNC \u5b57\u6bb5\uff0c\u5982\u679c\u6ca1\u6709\uff0c\u5219\u81ea\u52a8\u589e\u52a0\u6b64\u5b57\u6bb5<\/div>\n
BEGIN<\/div>\n
\u00a0declare @strDate as char(6)<\/div>\n
\u00a0declare @strDBTable as varchar(24)<\/div>\n
\u00a0declare @strSQL as varchar(1024)<\/div>\n
<\/div>\n
\u00a0— Mobile \u672c\u6708\u6d88\u606f\u8868<\/div>\n
\u00a0Set @strDate = left( Convert( char(8), GetDate(), 112 ), 6 )<\/div>\n
\u00a0Set @strDBTable = ‘OI_STK_MOBILE_MSG_’ + @strDate<\/div>\n
<\/div>\n
\u00a0IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(@strDBTable) AND OBJECTPROPERTY(id, N’IsUserTable’) = 1)<\/div>\n
\u00a0BEGIN<\/div>\n
\u00a0 IF NOT EXISTS (select * from syscolumns where id = object_id(@strDBTable) and name= ‘C_SYNC’)<\/div>\n
\u00a0 BEGIN<\/div>\n
\u00a0 \u00a0 Set @strSQL = ‘ALTER TABLE ‘ + @strDBTable + ‘ ADD [C_SYNC] [char](1) NOT NULL CONSTRAINT DF_STK_MBMSG_’ + @strDate + ‘_C_SYNC DEFAULT ”0”’<\/div>\n
\u00a0 \u00a0 EXEC( @strSQL )<\/div>\n
<\/div>\n
\u00a0 \u00a0 — \u8bbe\u7f6e \u540c\u6b65\u6807\u8bb0 \u4e3a Y<\/div>\n
\u00a0 \u00a0 Set @strSQL = ‘UPDATE ‘ + @strDBTable + ‘ SET C_SYNC = ”1”’<\/div>\n
\u00a0 \u00a0 EXEC( @strSQL )<\/div>\n
\u00a0 END<\/div>\n
\u00a0END<\/div>\n
<\/div>\n
\u00a0— STK \u672c\u6708\u6d88\u606f\u8868<\/div>\n
\u00a0Set @strDBTable = ‘OI_STK_MSG_’ + @strDate<\/div>\n
<\/div>\n
\u00a0IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(@strDBTable) AND OBJECTPROPERTY(id, N’IsUserTable’) = 1)<\/div>\n
\u00a0BEGIN<\/div>\n
\u00a0 IF NOT EXISTS (select * from syscolumns where id = object_id(@strDBTable) and name= ‘C_SYNC’)<\/div>\n
\u00a0 BEGIN<\/div>\n
\u00a0 \u00a0 Set @strSQL = ‘ALTER TABLE ‘ + @strDBTable + ‘ ADD [C_SYNC] [char](1) NOT NULL CONSTRAINT DF_STK_MSG_’ + @strDate + ‘_C_SYNC DEFAULT ”0”’<\/div>\n
\u00a0 \u00a0 EXEC( @strSQL )<\/div>\n
<\/div>\n
\u00a0 \u00a0 — \u8bbe\u7f6e \u540c\u6b65\u6807\u8bb0 \u4e3a Y<\/div>\n
\u00a0 \u00a0 Set @strSQL = ‘UPDATE ‘ + @strDBTable + ‘ SET C_SYNC = ”1”’<\/div>\n
\u00a0 \u00a0 EXEC( @strSQL )<\/div>\n
\u00a0 END<\/div>\n
\u00a0END<\/div>\n
<\/div>\n
\u00a0— Mobile \u4e0a\u4e2a\u6708\u6d88\u606f\u8868<\/div>\n
\u00a0Set @strDate = left( Convert( char(8), DATEADD( MONTH, -1, GetDate() ), 112 ), 6 )<\/div>\n
\u00a0Set @strDBTable = ‘OI_STK_MOBILE_MSG_’ + @strDate<\/div>\n
<\/div>\n
\u00a0IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(@strDBTable) AND OBJECTPROPERTY(id, N’IsUserTable’) = 1)<\/div>\n
\u00a0BEGIN<\/div>\n
\u00a0 IF NOT EXISTS (select * from syscolumns where id = object_id(@strDBTable) and name= ‘C_SYNC’)<\/div>\n
\u00a0 BEGIN<\/div>\n
\u00a0 \u00a0 Set @strSQL = ‘ALTER TABLE ‘ + @strDBTable + ‘ ADD [C_SYNC] [char](1) NOT NULL CONSTRAINT DF_STK_MBMSG_’ + @strDate + ‘_C_SYNC DEFAULT ”0”’<\/div>\n
\u00a0 \u00a0 EXEC( @strSQL )<\/div>\n
<\/div>\n
\u00a0 \u00a0 — \u8bbe\u7f6e \u540c\u6b65\u6807\u8bb0 \u4e3a Y<\/div>\n
\u00a0 \u00a0 Set @strSQL = ‘UPDATE ‘ + @strDBTable + ‘ SET C_SYNC = ”1”’<\/div>\n
\u00a0 \u00a0 EXEC( @strSQL )<\/div>\n
\u00a0 END<\/div>\n
\u00a0END<\/div>\n
<\/div>\n
\u00a0— STK \u4e0a\u4e2a\u6708\u6d88\u606f\u8868<\/div>\n
\u00a0Set @strDBTable = ‘OI_STK_MSG_’ + @strDate<\/div>\n
<\/div>\n
\u00a0IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(@strDBTable) AND OBJECTPROPERTY(id, N’IsUserTable’) = 1)<\/div>\n
\u00a0BEGIN<\/div>\n
\u00a0 IF NOT EXISTS (select * from syscolumns where id = object_id(@strDBTable) and name= ‘C_SYNC’)<\/div>\n
\u00a0 BEGIN<\/div>\n
\u00a0 \u00a0 Set @strSQL = ‘ALTER TABLE ‘ + @strDBTable + ‘ ADD [C_SYNC] [char](1) NOT NULL CONSTRAINT DF_STK_MSG_’ + @strDate + ‘_C_SYNC DEFAULT ”0”’<\/div>\n
\u00a0 \u00a0 EXEC( @strSQL )<\/div>\n
<\/div>\n
\u00a0 \u00a0 — \u8bbe\u7f6e \u540c\u6b65\u6807\u8bb0 \u4e3a Y<\/div>\n
\u00a0 \u00a0 Set @strSQL = ‘UPDATE ‘ + @strDBTable + ‘ SET C_SYNC = ”1”’<\/div>\n
\u00a0 \u00a0 EXEC( @strSQL )<\/div>\n
\u00a0 END<\/div>\n
\u00a0END<\/div>\n
<\/div>\n
END<\/div>\n
GO<\/div>\n","protected":false},"excerpt":{"rendered":"

— \u68c0\u6d4b\u6700\u8fd1\u4e24\u4e2a\u6708\u6d88\u606f\u8868\uff0c\u5982\u679c\u6709\uff0c\u5219\u68c0\u6d4b\u662f\u5426 C_SYNC \u5b57\u6bb5\uff0c\u5982\u679c\u6ca1\u6709\uff0c\u5219\u81ea\u52a8\u589e\u52a0\u6b64\u5b57\u6bb5 BE […]<\/p>\n","protected":false},"author":1,"featured_media":970,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,3,4],"tags":[15],"class_list":["post-975","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pcenter","category-cpsc","category-shishi","tag-sql"],"_links":{"self":[{"href":"http:\/\/www.haoht.com.cn\/wp-json\/wp\/v2\/posts\/975","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.haoht.com.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.haoht.com.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.haoht.com.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.haoht.com.cn\/wp-json\/wp\/v2\/comments?post=975"}],"version-history":[{"count":1,"href":"http:\/\/www.haoht.com.cn\/wp-json\/wp\/v2\/posts\/975\/revisions"}],"predecessor-version":[{"id":976,"href":"http:\/\/www.haoht.com.cn\/wp-json\/wp\/v2\/posts\/975\/revisions\/976"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.haoht.com.cn\/wp-json\/wp\/v2\/media\/970"}],"wp:attachment":[{"href":"http:\/\/www.haoht.com.cn\/wp-json\/wp\/v2\/media?parent=975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.haoht.com.cn\/wp-json\/wp\/v2\/categories?post=975"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.haoht.com.cn\/wp-json\/wp\/v2\/tags?post=975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}