updategram发送端口后执行存储过程吗? [英] Execute Stored Procedure after updategram send port?
问题描述
我能够读取csv文件并将其映射到更新报文,并将接收到的文件名和批量数据成功地插入数据库中,但是现在我遇到的问题是,我还必须在updategram发送端口.
存储过程不接受任何参数,不返回任何值. (它的操作如下:
创建过程[dbo].[Usp_Insert_CustomerInfo]
从sales_dump表中检索文件名,并根据dbo.dealer表中的发牌人代码获取发牌人
十进制@filename varchar(255)
DECLARE @DealerCode varchar(50)
宣告@DealerID int
从dbo.Sales_DataDump中选择@filename = Reverse(left(Reverse(Reverse(ReceivedFileName),Charindex(''\'',Reverse(ReceivedFileName))-1))
SET @DealerCode =(从dbo.fnParseStringTSQL(@filename,''_'')中选择*)
SET @DealerID =(从dbo.Dealer中选择经销商ID,其中Dealercode = @Dealercode)
--FROM SALES_DATADUMP放入
--1)将数据插入到Customer_Contact_Info_Detail
插入dbo.Customer_Contact_Info_Detail(CustomerID,DealerID,Address,Address2,City,State,ZipCode,HomePhone,OfficePhone,CellPhone,Email)SELECT CustomerID,@ DealerID,Address,Address2,City,State,ZipCode,HomePhone,OfficePhone,CellPhone,Email来自dbo.Sales_DataDump
-------------------------------------------------- --------------------------------------
这是在执行UPDATEGRAM的发送端口后需要在业务流程的发送端口中执行的存储过程(并且在执行UPDATEGRAM的发送端口之后,我无法执行任何代码.
基本上来说-我需要
1个接收端口(用于平面文件),
1发送消息(用于将数据插入到sales_dump表中的更新报文)
1发送消息至(执行存储过程调用,不带任何参数或没有返回值)仅触发执行.
这是否可能(我从1个星期以来就一直在这个问题上犹豫不决.(非常紧急)任何帮助都将受到赞赏.
谢谢
I am able to read the csv file and map it to an updategram and succesfully inserting the received filename and the bulk data into the database, but now the issue i have is , I have to also execute a stored procedure immediately after the updategram send port.
the stored procedure does not accept any parameter not returns any values. (what it does is as follows:
create PROCEDURE [dbo].[Usp_Insert_CustomerInfo]
retreive filename from sales_dump table and get the dealerid based on the dealercode from dbo.dealer table
DECLARE @filename varchar(255)
DECLARE @DealerCode varchar(50)
DECLARE @DealerID int
Select @filename = Reverse(left(Reverse(ReceivedFileName),Charindex(''\'',Reverse(ReceivedFileName))-1)) From dbo.Sales_DataDump
SET @DealerCode = (select * from dbo.fnParseStringTSQL(@filename,''_''))
SET @DealerID = (select dealerid from dbo.Dealer where dealercode = @Dealercode)
--FROM SALES_DATADUMP INTO
--1) INSERT DATA INTO Customer_Contact_Info_Detail
INSERT dbo.Customer_Contact_Info_Detail(CustomerID,DealerID,Address,Address2 ,City,State,ZipCode,HomePhone,OfficePhone,CellPhone,Email) SELECT CustomerID,@DealerID,Address,Address2 ,City,State,ZipCode,HomePhone,OfficePhone,CellPhone,Email FROM dbo.Sales_DataDump
----------------------------------------------------------------------------------------
THIS IS THE STORED PROCEDURE THAT I NEED TO EXECUTE IN THE SEND PORT OF ORCHESTRATION AFTER THE SEND PORT OF UPDATEGRAM IS EXECUTED (AND I AM NOT ABLE TO EXECUTE ANY CODE AFTER THE SEND PORT FOR UPDATEGRAM IS IMPLEMENTED.
SO BASICALLY - I NEED
1 RECEIVE PORT (for flat file),
1 send message for (updategram to insert data into sales_dump table)
1 send message to (execute Stored procedure call wihtout any parameters or no return values) just trigger execute.
is this possible (i have been breaking my head on this issue since 1 week. (its very urgent) any help is gr8tly appreciated.
thanks
推荐答案
1发送端口(用于更新数据以插入数据)放入sales_dump表)
1将端口发送到(执行存储过程调用,不带任何参数或没有返回值)仅触发执行.
1 send port for (updategram to insert data into sales_dump table)
1 send port to (execute Stored procedure call wihtout any parameters or no return values) just trigger execute.
我完全不清楚发送端口"是什么.但是,为什么不能只在触发器的数据插入到sales_dump表中时调用存储的proc?
I am not at all clear what a ''send port'' is. However, why can''t you just put a trigger on the insert of data to the sales_dump table, to call your stored proc ?
这篇关于updategram发送端口后执行存储过程吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!