knowledgebase:stored_procedure

Using Stored Procedures to load data

Here is an example of how to load data using a stored procedure.

Using this approach gives the user the ability to perform complex transformations inside the database, for example, the user may have a look table which is just too big to pull out or a user may want to reuse existing code.

Please note that bulk loading is always faster

CREATE TABLE [dbo].[orders](
 [customerid] [char](5) NOT NULL,
 [orderno] [decimal](20, 5) NOT NULL,
 [orderdate] [smalldatetime] NOT NULL,
 [amount] [decimal](16, 2) NOT NULL
) ON [PRIMARY]
CREATE PROCEDURE [dbo].[p_Populate_Data]
(
 @customerid char(5),
 @orderno    decimal(20,5),
 @orderdate  smalldatetime,
 @amount     decimal(16, 2)
)
AS
begin
 set nocount on
 insert into orders (customerid,orderno,orderdate,amount) 
 values(@customerid,@orderno,@orderdate,@amount)
end

Both Visual Importer ETL and Advanced ETL Processor support working with stored procedures

For more technologies supported by our ETL Software see Advanced ETL Processor Versions and Visual Importer ETL Versions

Confused? Ask question on our ETL Forum

  • knowledgebase/stored_procedure.txt
  • Last modified: 13/04/2019 17:22
  • by admin