½«Ö¸¶¨µÄ±í/ÊÓͼÖеÄÊý¾Ýµ¼³öΪ html Îļþ
IF OBJECT_ID(N'dbo.p_ExportHtml') IS NOT NULL
DROP PROC dbo.p_ExportHtml;
GO
/*-- == µ¼³ö±í/ÊÓͼÖеÄÊý¾ÝΪhtml Îļþ======================
´Ë´æ´¢¹ý³ÌÓÃÓÚ½«Ö¸¶¨µÄ±í/ÊÓͼÖеÄÊý¾Ýµ¼³öΪ html Îļþ
ÓÉÓÚÊÇʹÓô洢¹ý³Ì, Òò´ËÎļþĿ¼»ùÓÚ sql server ·þÎñÆ÷
´æ´¢¹ý³ÌÖлáʹÓÃxp_cmdshell µ÷ÓÃbcp À´Ð´Îļþ
Òò´Ë±ØÐë´ò¿ªxp_cmdshell ¹¦ÄÜ, ¿ÉÒÔʹÓÃÏÂÃæµÄ½Å±¾ÊµÏÖ
EXEC sp_configure N'show advanced options', 1 RECONFIGURE;
EXEC sp_configure N'xp_cmdshell', 1 RECONFIGURE;
---------------------------------------------------------
-- µ÷ÓÃʾÀý
EXEC dbo.p_ExportHtml
@object_name = N'sys.objects',
@file_name = N'c:\test.html';
---------------------------------------------------------
-- »·¾³ÒªÇó
ÊÊÓÃÓÚsql server 2005 »òÕ߸ü¸ßµÄ°æ±¾
-- ==== ×Þ½¨2008.11(ÒýÓÃÇë±£Áô´ËÐÅÏ¢) =============== */
CREATE PROC dbo.p_ExportHtml
@object_name sysname,
@file_name nvarchar(260),
@title nvarchar(1000) = NULL -- html ±êÌâ, ΪNULLʱʹÓÃ@object_name
AS
SET NOCOUNT ON;
DECLARE
@sql_field nvarchar(max),
@sql_body nvarchar(max);
SELECT
@sql_field = N'',
@sql_body = N''
SELECT
@sql_field = @sql_field
+ N' UNION ALL SELECT field_name = N' + QUOTENAME(C.name, N''''),
@sql_body = @sql_body
+ N', [td/@align] = '
+ QUOTENAME(
CASE
WHEN T.name LIKE N'%int'
Ïà¹ØÎĵµ£º
Êó±êµÄ¶àÖÖÑùʽ...
<P><a href="help.htm" style="cursor:hand">ÊÖ</a>
<a href="help.htm" style="cursor:text">Îı¾</a>
<a href="help.htm" style="cursor:MOVE">Ëĸö·½ÏòµÄ¼ýÍ·</a>
<a href="help.htm" st ......
Ö÷ÒªÊǽ«jsonÎÞ·¨Ê¶±ðµÄ×Ö·û½øÐÐתÒå
function dotran($str) {
$str = str_replace('"','\\"',$str);
$str = str_replace("\r\n",'\\r\\n',$str);
$str = str_ ......
<html>
<frameset cols="25%,50%,25%">
<frame src="/example/html/frame_a.html">
<frame src="/example/html/frame_b.html">
<frame src="/example/html/frame_c.html">
<noframes>
<!-- ÔÚä¯ÀÀÆ÷²»Ö§³ÖÊ ......
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
Option Explicit
Response.Buffer = True '»º´æÍ¼Æ¬
Dim objXMLHTTP, XML
Set XML = Server.CreateObject("Microsoft.XMLHTTP") '½¨Á¢ÏÂÔØ¶ÔÏó
XML.Open "GET","http://www.google.cn/images/nav_logo7.png",False '¿ªÊ¼»ñȡͼƬ,http://xxx/pngÕâ½Ú¿ÉÒԸijÉ× ......