由于网站更新,2个新闻列表字段一样,但新闻类别字段不同,就需要替换后再导入,下面是详细sql代码:
set IDENTITY_INSERT lt_article_contentt off
set IDENTITY_INSERT #a on
declare @cid int
declare @classid int
set @classid=83
set @cid=108
INSERT INTO #a ([News_id], [Title], [Dat], [author], [Source], [Content], [Classid], [Tj], [sh], [Hit], [TitlePic], [Keyword], [Link], [All_wjm], [All_wjs], [One_wjm], [faburen], [shr], [focus], [pid], [fb_jg], [fb_wh], [ss_dat], [otherid], [webname], [isshow], [lmname], [tjsj])
SELECT * FROM LT_ARTICLE_CONTENT11 WHERE CLASSID=@cid
UPDATE #a
SET CLASSID=@classid
WHERE CLASSID=@cid
set IDENTITY_INSERT #a off
set IDENTITY_INSERT lt_article_contentt on
insert into lt_article_contentt([News_id], [Title], [Dat], [author], [Source], [Content], [Classid], [Tj], [sh], [Hit], [TitlePic], [Keyword], [Link], [All_wjm], [All_wjs], [One_wjm],