zfj新闻表导入

2021年2月22日 27点热度 0条评论 来源: 人约黄昏月

  普通新闻

INSERT INTO [ylzfjDB].[dbo].[Article_News](N_Title,N_Content,N_mID,N_pic,N_from,N_author,N_addTime,N_isTop,N_hitCount,N_isIndex,N_newsType)
SELECT [N_title],[N_content],11,[N_pic],[N_from],[N_author],[N_addtime],[N_top],[N_hits],[N_homepic],1
FROM [ylzhzfDB].[dbo].[Article_News] news
WHERE  news.N_sid=11 and news.N_id>2723

专题新闻

INSERT INTO [ylzfjDB].[dbo].[Article_News](N_Title,N_Content,N_mID,N_pic,N_from,N_author,N_addTime,N_isTop,N_hitCount,N_isIndex,N_newsType)
SELECT [N_title],[N_content],70,[N_pic],[N_from],[N_author],[N_addtime],[N_top],[N_hits],[N_homepic],3
FROM [ylzhzfDB].[dbo].[Article_News] news
WHERE  news.[N_topics]=18 and news.N_id>2723

 

交流互动

 INSERT INTO [ylzfjDB].[dbo].[Article_Guestbook]([G_Num],[G_title],[G_content],[G_chatname],[G_tel],[G_email],[G_chattime],[G_recontent],[G_retime],
 [G_IP],[G_mID],[G_read],[G_isShow],[G_company],[G_fox],[G_pwd])
 SELECT [E_number],[E_title],[E_content],[E_name],[E_Tel],[E_Email],[E_addtime],[E_Recontent],[E_Raddtime],[E_ip],57,[E_ISReply],[E_ISpublic],
 [E_user],[E_fox],[E_pwd]
  FROM [ylzhzfDB].[dbo].[Article_Exchange] where [E_type]=2 and [E_id]>1050

去重

    select distinct [N_topics] FROM [ylzhzfDB].[dbo].[Article_News] where [N_id]>2723

 

调查问卷

问题

INSERT INTO [ylzfjDB].[dbo].[Questionnaire]([Q_Name],[Q_desc],[Q_class],[Q_isUsed],[Q_fid],[Q_addtime])
SELECT [I_Name],[I_desc],[I_count],[I_isUsed],[I_fID],[I_addtime]
FROM [ylzhzfDB].[dbo].[Article_interaction] interaction 
WHERE  [I_ID]=74

标题

INSERT INTO [ylzfjDB].[dbo].[Questionnaire]([Q_Name],[Q_desc],[Q_class],[Q_isUsed],[Q_fid],[Q_addtime])
SELECT [I_Name],[I_desc],[I_count],[I_isUsed],45,[I_addtime]
FROM [ylzhzfDB].[dbo].[Article_interaction] interaction
WHERE [I_ID]=75
 

选项

INSERT INTO [ylzfjDB].[dbo].[Answer]([A_Name],[A_count],[A_isUsed],[A_addtime],[A_qId])
SELECT [I_Name],[I_count],[I_isUsed],[I_addtime],46
FROM [ylzhzfDB].[dbo].[Article_interaction] interaction 
WHERE  interaction.I_fID=75

 

    原文作者:人约黄昏月
    原文地址: https://blog.csdn.net/baidu_41909845/article/details/113943392
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。