How to pass a value to a stored proc?
Situation: I need to load a CSV file into SQL Server, and have defined the file schema, data mapping, trigger, etc to do that.
I want to read the first record(row) in the CSV file and take the value from one of the field and run a store proc. The store proc returns an id in an output parameter and I want to store this id in every record in the sql server db.
-
Here are the high level steps for your flow:
1) Create a context variable and store the value from the field within that variable
2) Pass this context variable as an input parameter to your stored procedure
3) Store the output parameter of the stored procedure in another context variable
4) Within the mapping, use a for each rule and map the variable to the necessary field on the target schema of the db.0
Post is closed for comments.
Comments
1 comment