DimInternationalFunction というテーブルを作成しました。
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[DimInternationalFunction]') AND type in (N'U'))
DROP TABLE [DimInternationalFunction]
Go
Create Table DimInternationalFunction
(IntFunctionKey int NOT NULL identity primary key,
SubSubFunctionString char(10),
FunctionCode char(3),
SubFunctionCode char(6),
SubSubFunctionCode char(10),
SubSubFunctionName nvarchar(60),
SubFunctionName nvarchar(60),
FunctionName nvarchar(60))
最初に、SSMS のこのテーブルにレコードを挿入しました。
SSMS で最初のレコードを手動で挿入した後、マネージャーは SSIS を使用して「新しいレコードのみ」を挿入するように求めています。
これをSSMSで使用してみましたが、うまくいきました。レコードが 0 件挿入されるか、結果として 5 件のレコードが挿入されることがあります。私のマネージャーは、SSIS でこれを行うように求めています。
データ アクセス モードの OLE DB ソース内でこのスクリプトを使用してみました: SQL コマンドと SQL コマンド テキスト:
insert into DWResourceTask.dbo.DimInternationalFunction
select f.SubSubFunctionString,
f.FunctionCode,
f.SubFunctionCode,
f.SubSubFunctionCode,
f.SubSubFunctionName,
f.SubFunctionName,
f.FunctionName
from ODS_Function F
where FunctionViewCode = 'INT'
and not exists (select * from DWResourceTask.dbo.DimInternationalFunction I
where (f.SubSubFunctionString=i.SubSubFunctionString
and f.FunctionCode=i.FunctionCode
and f.SubFunctionCode=i.SubFunctionCode
and f.SubSubFunctionCode=i.SubSubFunctionCode
and f.SubSubFunctionName=i.SubSubFunctionName
and f.SubFunctionName=i.SubFunctionName
and f.FunctionName=i.FunctionName)
)
プレビューをクリックした後に表示されるエラー メッセージは次のとおりです。
The component reported the following warnings:
Error at Int Function [International Function Table [33]]: No column information was returned by the SQL command.
Choose OK if you want to continue with the operation.
Choose Cancel if you want to stop the operation.
これを実行できる SSIS の別のコンポーネントはありますか? または、exec sql タスク コンポーネントまたは ole db ソースのいずれかを使用できますか?
データ フロー タスクに接続された exec sql タスクを使用することを考えています。データ フロー タスク内で、ステージング テーブルを含む ole db ソースを配置し、それを削除するか、それを行う他の方法があります。助けてください。前もって感謝します。