zoukankan      html  css  js  c++  java
  • sqlserver 拷贝同步多个表数据到另一张表

    --/****** Script for SelectTopNRows command from SSMS ******/

    Insert into [DMSBusiness].[dbo].[Business_DMS_PerformanceEvaluate]
    ( [SystemCreateDate]
    ,[SystemCreator]
    ,[SystemParentID]
    ,[SystemFormStatus]
    ,[Year]
    ,[Quarty]
    ,[PerformanceEvaluateLevel]
    ,[PerformanceEvaluate]
    ,[DirectSupervisor]
    ,[DecisionMakingSupervisor])
    select [SystemCreateDate]
    ,[SystemCreator]
    ,[ID]
    ,[SystemFormStatus]
    ,[PerpormanceYear]
    ,[PerformanceSeason]
    ,[FinalRate]
    ,[Comment]
    ,[SeasonDirector]
    ,[SeasonPolicymakers]     //字段相对应;赋值关系
    from (
    SELECT c.[ID]
    ,a.[SystemCreator]
    ,a.[SystemCreateDate]
    ,a.[PerformanceSeason]
    ,a.[PerpormanceYear]
    ,a.[FinalRate]
    ,a.[Comment]
    ,[SeasonDirector]
    ,[SeasonPolicymakers]
    ,a.[SystemFormStatus]
    FROM [DMSBusiness].[dbo].[Business_DMS_Performance] as a
    join (SELECT [ID],[UserId]
    FROM [DMSBusiness].[dbo].[Business_DMS_Employees]) as c on a.SystemCreator=c.UserId
    ) d where [SystemFormStatus]=373

    将表Business_DMS_Performance和表Business_DMS_Employees链接出来的临时表数据拷贝到表Business_DMS_PerformanceEvaluate的指定字段

  • 相关阅读:
    MySQL "show users"
    MySQL
    A MySQL 'create table' syntax example
    MySQL backup
    MySQL show status
    Tomcat, pathinfo, and servlets
    Servlet forward example
    Servlet redirect example
    Java servlet example
    How to forward from one JSP to another JSP
  • 原文地址:https://www.cnblogs.com/min-min-min/p/6362759.html
Copyright © 2011-2022 走看看