{"id":663,"date":"2010-10-01T08:41:37","date_gmt":"2010-10-01T08:41:37","guid":{"rendered":"http:\/\/enjoyasp.net\/?p=663"},"modified":"2010-10-01T08:41:37","modified_gmt":"2010-10-01T08:41:37","slug":"%e6%89%a7%e8%a1%8c%e9%93%be%e6%8e%a5%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e7%9a%84%e5%ad%98%e5%82%a8%e8%bf%87%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/enjoyasp.net\/index.php\/2010\/10\/01\/%e6%89%a7%e8%a1%8c%e9%93%be%e6%8e%a5%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e7%9a%84%e5%ad%98%e5%82%a8%e8%bf%87%e7%a8%8b\/","title":{"rendered":"\u6267\u884c\u94fe\u63a5\u670d\u52a1\u5668\u4e0a\u7684\u5b58\u50a8\u8fc7\u7a0b"},"content":{"rendered":"<pre lang=\"tsql\">\r\nsyscomments :\u6b64\u8868\u5b58\u653e\u7740\u5b58\u50a8\u8fc7\u7a0b\u7684\u8bed\u53e5\r\n\r\n \/*\u4ece\u94fe\u63a5\u670d\u52a1\u5668\u4e0a\u62ff\u5230\u5b58\u50a8\u8fc7\u7a0b\uff0c\u5728\u76ee\u6807\u670d\u52a1\u5668\u4e0a\u6267\u884c\uff0c\u53ef\u7528\u4e8e\u53d1\u5e03\u4e0e\u66f4\u65b0*\/\r\nDECLARE @text VARCHAR(MAX),@objectName VARCHAR(100),@objectID int\r\nDECLARE p CURSOR FOR\r\nSELECT NAME,id FROM dpserver.brm_lvjian_new.dbo.sysobjects o\r\nWHERE xtype IN('P') \r\nAND o.crdate >= GETDATE()-3\r\nOPEN p\r\nFETCH NEXT FROM p INTO @objectName,@objectID\r\nWHILE @@FETCH_STATUS = 0\r\nBEGIN\r\n    SET @text = ''\r\n    SELECT @text = @text + convert(VARCHAR(MAX),text) FROM dpserver.brm_lvjian_new.dbo.syscomments s \r\n    WHERE id = @objectID\r\n    IF ( EXISTS( SELECT 1 FROM sysobjects WHERE NAME = @objectName AND xtype IN('P')  ) )\r\n    BEGIN\r\n        --\r\n        EXEC ('DROP PROCEDURE dbo.' +  @objectName)\r\n    END\r\n    EXEC(@text)\r\n    FETCH NEXT FROM p INTO @objectName,@objectID    \r\nEND\r\nCLOSE p\r\nDEALLOCATE p\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>syscomments :\u6b64\u8868\u5b58\u653e\u7740\u5b58\u50a8\u8fc7\u7a0b\u7684\u8bed\u53e5 \/*\u4ece\u94fe\u63a5\u670d\u52a1\u5668\u4e0a\u62ff\u5230\u5b58\u50a8\u8fc7\u7a0b\uff0c\u5728\u76ee\u6807\u670d\u52a1\u5668\u4e0a\u6267\u884c\uff0c\u53ef\u7528\u4e8e [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[36],"tags":[],"class_list":["post-663","post","type-post","status-publish","format-standard","hentry","category-sql-server"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts\/663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/comments?post=663"}],"version-history":[{"count":0,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/posts\/663\/revisions"}],"wp:attachment":[{"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/media?parent=663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/categories?post=663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enjoyasp.net\/index.php\/wp-json\/wp\/v2\/tags?post=663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}