通过从两个数据库加入来执行sql任务参数 [英] execute sql task paramter by joining from two databases

查看:84
本文介绍了通过从两个数据库加入来执行sql任务参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的执行sql任务需要使用参数根据使用参数的单独数据库中的登台表从事实表中删除数据,任务不是删除数据。

my execute sql task needs to use a parameter to delete data from fact table based on the staging table in seperate database using paramters, The task is not deleting the data.

从fact.dbo.fact表中删除

delete from fact.dbo.fact table

加入staging.dbo.staging表

join staging.dbo.staging table

其中staging.dbo.staging table .variable ='n'

where staging.dbo.staging table .variable = 'n'

请告知如何执行,单个数据库工作正常,但加入两个基于参数的数据库不是数据

Please advice how to execute, single database working fine, but joining two databases based on prarameter is not dleetng the data

推荐答案

您的DELETE语句根本无效。缺少JOIn谓词,并且使用相同别名"table"的2倍。
Your DELETE Statement is not valid at all. The JOIn predicate is missing and you use 2 times the same alias "table".


这篇关于通过从两个数据库加入来执行sql任务参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆