尝试比较两个表并将相同的EPC值添加到另一个表

时间:2019-06-18 03:38:41

标签: sql-server

我正在尝试比较同一数据库中两个不同表中的两个列(PriorityLevel表EPC列和table3 EPC列)。这两个表中的EPC值不同,将进入表2。但是出现以下错误。

Started by user XXXX
 > git rev-parse --is-inside-work-tree # timeout=10
Setting origin to ssh://git@XXXX.git
 > git config remote.origin.url ssh://XXXXX.git # timeout=10
Fetching origin...
Fetching upstream changes from origin
 > git --version # timeout=10
 > git config --get remote.origin.url # timeout=10
using GIT_SSH to set credentials jenkins-generated-ssh-key
 > git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/* # timeout=10
hudson.plugins.git.GitException: Command "git fetch --tags --progress origin +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: error: object file .git/objects/45/069050ab17bc02837813a835e828fe9570ccbb is empty
error: object file .git/objects/45/069050ab17bc02837813a835e828fe9570ccbb is empty
fatal: loose object 45069050ab17bc02837813a835e828fe9570ccbb (stored in .git/objects/45/069050ab17bc02837813a835e828fe9570ccbb) is corrupt

    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2318)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1905)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:81)
    at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:488)
    at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:365)
    at jenkins.plugins.git.AbstractGitSCMSource.doRetrieve(AbstractGitSCMSource.java:325)
    at jenkins.plugins.git.AbstractGitSCMSource.retrieve(AbstractGitSCMSource.java:391)
    at jenkins.scm.api.SCMSource.fetch(SCMSource.java:582)
    at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:98)
    at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:293)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE

错误

  

无法绑定多部分标识符“ table3.EPC”。

1 个答案:

答案 0 :(得分:0)

尝试这种方式:

INSERT INTO table2 (EPC)
SELECT PL.EPC
FROM   priorityLevel PL
WHERE  NOT EXISTS (
                     SELECT  1
                     FROM    table3 T3
                     WHERE   PL.EPC = T3.EPC
                  );