1.创建表
USE [ZCJ_DB] GO /****** Object: Table [dbo].[InfoContent] Script Date: 02/27/2017 18:22:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[InfoContent]( [InfoContentID] [uniqueidentifier] NOT NULL,[COLID] [uniqueidentifier] NOT NULL,[BelongToUserID] [int] NOT NULL,[InfoTitle] [nvarchar](500) NOT NULL,[InfoSubTitle] [nvarchar](500) NOT NULL,[InfoShortDesc] [nvarchar](500) NOT NULL,[InfoCon] [nvarchar](max) NOT NULL,[KeyWord] [nvarchar](200) NOT NULL,[PDL] [nvarchar](500) NOT NULL,[Picture] [nvarchar](500) NOT NULL,[HomePicture] [nvarchar](500) NULL,[LinkUrl] [nvarchar](500) NOT NULL,[IsLink] [bit] NOT NULL,[Status] [int] NOT NULL,[IsTop] [nvarchar](50) NOT NULL,[Source] [nvarchar](200) NOT NULL,[Author] [nvarchar](200) NOT NULL,[PV] [int] NOT NULL,[CommentNum] [int] NULL,[Remark] [nvarchar](2000) NOT NULL,[OrderIndex] [int] NOT NULL,[UpdateUserID] [int] NOT NULL,[UpdateDate] [datetime] NOT NULL,[CreatedUserID] [int] NOT NULL,[CreateDate] [datetime] NOT NULL,[IdentityID] [int] NOT NULL,CONSTRAINT [PK_a_inf_InfoContent] PRIMARY KEY NONCLUSTERED ( [InfoContentID] ASC )WITH (PAD_INDEX = OFF,STATISTICS_NORECOMPUTE = OFF,IGNORE_DUP_KEY = OFF,ALLOW_ROW_LOCKS = ON,ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY] GO EXEC sys.sp_addextendedproperty @name=N'MS_Description',@value=N'-1:不限 1:正常 4:置顶首页 5:置顶首页头条 6:置顶首页推荐 7:置顶首页平台热点 8:行业百科',@level0type=N'SCHEMA',@level0name=N'dbo',@level1type=N'TABLE',@level1name=N'a_inf_InfoContent',@level2type=N'COLUMN',@level2name=N'IsTop' GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_InfoContentID] DEFAULT (newid()) FOR [InfoContentID] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_UserID] DEFAULT ((0)) FOR [BelongToUserID] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_InfoTitle] DEFAULT ('') FOR [InfoTitle] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_InfoSubTitle] DEFAULT ('') FOR [InfoSubTitle] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_InfoShortDesc] DEFAULT ('') FOR [InfoShortDesc] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_InfoCon] DEFAULT ('') FOR [InfoCon] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_KeyWord] DEFAULT ('') FOR [KeyWord] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_PDL] DEFAULT ('') FOR [PDL] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_Picture] DEFAULT ('') FOR [Picture] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_LinkUrl] DEFAULT ('') FOR [LinkUrl] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_IsLink] DEFAULT ((0)) FOR [IsLink] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_Status] DEFAULT ((1)) FOR [Status] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_IsTop] DEFAULT ((1)) FOR [IsTop] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_Source] DEFAULT ('') FOR [Source] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_Author] DEFAULT ('') FOR [Author] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_PV] DEFAULT ((0)) FOR [PV] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_CommentNum] DEFAULT ((0)) FOR [CommentNum] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_Remark] DEFAULT ('') FOR [Remark] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_OrderIndex] DEFAULT ((999)) FOR [OrderIndex] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_UpdateDate] DEFAULT (getdate()) FOR [UpdateDate] GO ALTER TABLE [dbo].[a_inf_InfoContent] ADD CONSTRAINT [DF_a_inf_InfoContent_CreateDate] DEFAULT (getdate()) FOR [CreateDate] GO
USE [ZCJ_DB] GO /****** Object: StoredProcedure [dbo].[a_Insert_News] Script Date: 02/27/2017 18:18:21 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /* * 功能描述:MysqL数据库新闻分类xml数据导入信息表 * 创建时间:2017-02-27 16:30 * 创建人:LHB * Update: 2017-02-27 16:30 * desc:XML大数据的情况下(上千),请使用OPENXML方案,具体请看: * https://technet.microsoft.com/zh-cn/library/ms186918(v=sql.110).aspx */ ALTER PROCEDURE [dbo].[a_Insert_News] AS BEGIN BEGIN TRANSACTION --1.定义 DECLARE @XmlDocument XML --多个词语 --2.读取xml文件 SELECT @XmlDocument=BulkColumn FROM OPENROWSET(BULK'C:\BaiduYunDownload\新闻分类.xml',SINGLE_BLOB) AS xmlData --定义句柄,并通过系统存储过程创建出xml文档对象 DECLARE @idoc INT; EXEC sp_xml_preparedocument @idoc OUTPUT,@XmlDocument; INSERT INTO InfoContent( [COLID],[BelongToUserID],[InfoTitle],[InfoSubTitle],[InfoShortDesc],[InfoCon],[KeyWord],[PDL],[Picture],[HomePicture],[LinkUrl],[IsLink],[Status],[IsTop],[Source],[Author],[PV],[CommentNum],[Remark],[OrderIndex],[UpdateUserID],[UpdateDate],[CreatedUserID],[CreateDate],[IdentityID] ) SELECT [COLID],[IdentityID] FROM OPENXML (@idoc,'/DATA/ROW',2) WITH ( --InfoContentID uniqueidentifier COLID uniqueidentifier,BelongToUserID int,InfoTitle nvarchar(500),InfoSubTitle nvarchar(500),InfoShortDesc nvarchar(500),InfoCon nvarchar(max),KeyWord nvarchar(200),PDL nvarchar(500),Picture nvarchar(500),HomePicture nvarchar(500),LinkUrl nvarchar(500),IsLink bit,Status int,IsTop nvarchar(50),Source nvarchar(200),Author nvarchar(200),PV int,CommentNum int,Remark nvarchar(2000),OrderIndex int,UpdateUserID int,UpdateDate datetime,CreatedUserID int,CreateDate DATETIME,IdentityID INT ) --移除句柄(必须) EXEC sp_xml_removedocument @idoc; COMMIT TRANSACTION END
3.准备xml文件数据()
<?xml version="1.0"?> -<DATA> -<ROW> <InfoContentID>25b50722-fcbf-11e6-be71-74d43504043d</InfoContentID> <COLID>FB2D8753-3E01-465F-9628-0C9ABAAE6427</COLID> <BelongToUserID>1</BelongToUserID> <InfoTitle>9月P2P成交量首破千亿 环比8月上升18.19%</InfoTitle> <InfoSubTitle>9月P2P成交量首破千亿 环比8月上升18.19%</InfoSubTitle> <InfoShortDesc>《中国P2P网贷行业2015年9月报》近日出炉。结果显示,9月P2P网贷行业整体成交量达1151.92亿元,环比8月上升18.19%,首次突破单月成交量千亿大关。其中,陆金所、你我贷等主流平台9月的成交量更是大幅提升。值得注意 ...</InfoShortDesc> <InfoCon><p style="line-height:30px;text-indent:nullem;text-align:left"><font color="#000"><font face="SimSun,宋体,"> 《中国P2P网贷行业2015年9月报》近日出炉。结果显示,9月P2P网贷行业整体成交量达1151.92亿元,环比8月上升18.19%,首次突破单月成交量千亿大关。其中,陆金所、你我贷等主流平台9月的成交量更是大幅提升。值得注意的是,上月网贷综合收益率继续呈现下降态势,9月网贷行业综合收益率为12.63%,环比8月下降了35个基点。从近两个月的成交数据分析,P2P行业成交量均以超过18%以上的速度增长。</font></font></p><br> <p style="line-height:30px;text-indent:nullem;text-align:left"><font color="#000"><font face="SimSun,"> 9月P2P问题平台发生率也降至了今年以来的低位,为2.22%。你我贷创始人严定贵认为,P2P网贷的投资热度不断攀升,主要是由于近期股市、外贸疲软,部分资金回流;同时政策利好,监管细节渐明,越来越多的人认可P2P的投资方式。</font></font></p><br> <p style="line-height:30px;text-indent:nullem;text-align:left"><font color="#000"><font face="SimSun,"> 央行为了缓解经济下行的压力,9月推出了一系列宽松的货币政策,先后进行了8次逆回购操作,累计向市场投放超过6400亿元。宽松的货币环境,无疑会对网贷行业综合收益率带来影响。于是在供需平衡发生变化的背景下,网贷行业综合收益率出现了下降压力,9月多数平台综合收益率介于12%至24%之间,占比高达72.23%;其次为综合收益率在12%以下的平台,占比为18.48%。</font></font></p><br></InfoCon> <KeyWord>0</KeyWord> <PDL>《中国P2P网贷行业2015年9月报》近日出炉。结果显示,9月P2P网贷行业整体成交量达1151.92亿元,环比8月上升18.19%,首次突破单月成交量千亿大关。其中,陆金所、你我贷等主流平台9月的成交量更是大幅提升。值得注意 ...</PDL> <Picture/> <HomePicture/> <LinkUrl/> <IsLink>0</IsLink> <Status>1</Status> <IsTop>1</IsTop> <Source/> <Author>胜利</Author> <PV>0</PV> <CommentNum>0</CommentNum> <Remark/> <OrderIndex>999</OrderIndex> <UpdateUserID>1</UpdateUserID> <UpdateDate>2015-10-10 16:17:10</UpdateDate> <CreatedUserID>1</CreatedUserID> <CreateDate>2015-10-10 16:17:10</CreateDate> <IdentityID>1</IdentityID> </ROW> -<ROW> <InfoContentID>25bb4da9-fcbf-11e6-be71-74d43504043d</InfoContentID> <COLID>FB2D8753-3E01-465F-9628-0C9ABAAE6427</COLID> <BelongToUserID>4</BelongToUserID> <InfoTitle>A股上演黑天鹅 对P2P网贷是把“双刃剑”</InfoTitle> <InfoSubTitle>A股上演黑天鹅 对P2P网贷是把“双刃剑”</InfoSubTitle> <InfoShortDesc>社保是国家或企业对个人医疗和养老的一种福利体现,是强制性的。个体户自愿缴纳;商保是个人行为,是自愿的。</InfoShortDesc> <InfoCon><strong style="margin: 0px; padding: 0px; list-style: none outside none; color: rgb(43,43,43); font-family: 微软雅黑; font-size: 16px; line-height: 30px; text-indent: 32px;"> 核心提示:自6月中旬以来A股的连续下挫使得投资者至今仍然心有余悸,有媒体报道称股民人均亏损7.78万元。然而就在股市遭遇了前所未有的重创之时,P2P网贷收获了一组令业内倍感甜蜜的数据。</strong><div><strong style="margin: 0px; padding: 0px; list-style: none outside none; color: rgb(43,43); font-family: 微软雅黑; font-size: 16px; line-height: 30px; text-indent: 32px;"><p><a href="http://www.licaizhijia.com/data/attachment/portal/201510/12/135323vg0w4gvgyv4cgmr4.jpg" target="_blank"><img src="http://www.licaizhijia.com/data/attachment/portal/201510/12/135323vg0w4gvgyv4cgmr4.jpg"></a></p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;">自6月中旬以来A股的连续下挫使得投资者至今仍然心有余悸,有媒体报道称股民人均亏损7.78万元。然而就在股市遭遇了前所未有的重创之时,P2P网贷收获了一组令业内倍感甜蜜的数据。据网贷之家统计数据显示,2015年9月,P2P网贷行业整体成交量首次突破千亿大关,达到1151.92亿元。</p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;"><br></p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;">在股市持续低迷的同时,银行理财产品与宝宝类产品的收益率也出现了持续下滑之势。从10月1日开始,余额宝就已经跌破3%的关口,长假7天更是节节败退,7日年化收益率仅为2.958%,与此同时其他类余额宝货基产品,均纷纷破3,如理财通7日年化收益率为2.992%,电信添益宝、新浪微财富、网易现金宝均跌为2.759%,其他各家货基宝宝表现亦不容乐观。</p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;"><br></p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;">随着宝宝们的收益率连番下跌,在股市不兴、传统银行理财渠道收益平庸的大环境下,投资者们纷纷转向了相对收益较高的P2P市场。</p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;"><br></p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;">从过往数据我们能够发现,每逢A股市场出现持续走弱的行情,大量资金因“欲逃无路”,进而囤积进入到P2P领域,形成厚P2P而薄股市的格局;当A股市场出现持续走强的行情,甚至进入大牛市的行情,股市强大的赚钱效应吸引着天量资金,会使得囤积在P2P领域的资金夺路而逃,转而进入股市,形成厚股市而薄P2P的格局。这种现象也被认为是A股与P2P之间的跷跷板效应。</p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;"><br></p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;">然而,从整体投资风向来看,其实并不能简单地将股市与P2P之间的关系理解为“跷跷板”关系,更不能以此作为投资的判断。P2P平台事实上已经是金融市场的组成部分,而股市与金融向来是血脉相连不可分割的,资本市场的持续下跌,首先面临的就是融资平仓和股权质押的巨大风险。此前牛市热潮时,借助P2P平台进行非法配资的行为事后被发现大量存在,而股市下跌黑天鹅发生之时,这些P2P平台投资者事实上也进一步“感受”到股市下挫的千斤之压。</p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;"><br></p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;">而且,资本市场累积的风险未能得到有效纾解的话,将会延伸至实体经济领域。如此一来,对于不少的P2P平台来说,其债权端风险也逐渐会得以显现,最终,很可能会引发平台的系统性风险。</p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;"><br></p><p style="margin: 0px 0px 20px; padding: 0px; list-style: none outside none; text-indent: 2em; overflow: hidden; font-weight: normal;">股市下跌固然会使部分资金回流网贷行业,但是网贷平台运营者,在欣喜回流资金之余,也应谨防股市带来的系统性风险。</p></strong></div></InfoCon> <KeyWord>0</KeyWord> <PDL>社保是国家或企业对个人医疗和养老的一种福利体现,是强制性的。个体户自愿缴纳;商保是个人行为,是自愿的。</PDL> <Picture>http://www.licaizhijia.com/data/attachment/portal/201510/12/135323vg0w4gvgyv4cgmr4.jpg</Picture> <HomePicture>http://www.licaizhijia.com/data/attachment/portal/201510/12/135323vg0w4gvgyv4cgmr4.jpg.thumb.jpg</HomePicture> <LinkUrl/> <IsLink>0</IsLink> <Status>1</Status> <IsTop>1</IsTop> <Source/> <Author/> <PV>0</PV> <CommentNum>0</CommentNum> <Remark/> <OrderIndex>999</OrderIndex> <UpdateUserID>4</UpdateUserID> <UpdateDate>2015-10-12 13:54:14</UpdateDate> <CreatedUserID>4</CreatedUserID> <CreateDate>2015-10-12 13:54:14</CreateDate> <IdentityID>3</IdentityID> </ROW>
</DATA>原文链接:https://www.f2er.com/xml/294400.html