- Posts: 290
- Thank you received: 1
call a stored procedure with passing parameter
9 years 1 month ago #11175
by orlandoc
call a stored procedure with passing parameter was created by orlandoc
Here are my objectives:
1.) Generate a GUID value
2.) using "Reader" under Transformation, select a stored procedure and pass the GUID value
3.) this stored procedure will return number of columns and rows
4.) from "Reader" to "Validator" node to validate some value returned by the stored procedure
5.) from "validator" to "transformer" to select some fields and save it to another table.
1.) Generate a GUID value
2.) using "Reader" under Transformation, select a stored procedure and pass the GUID value
3.) this stored procedure will return number of columns and rows
4.) from "Reader" to "Validator" node to validate some value returned by the stored procedure
5.) from "validator" to "transformer" to select some fields and save it to another table.
Please Log in or Create an account to join the conversation.
9 years 1 month ago #11176
by admin
Mike
ETL Architect
Replied by admin on topic call a stored procedure with passing parameter
Perhaps you can post dummy stored procedure source?
Than we will be able to create a working example for you
Mike
Than we will be able to create a working example for you
Mike
Mike
ETL Architect
Please Log in or Create an account to join the conversation.
9 years 1 month ago - 9 years 1 month ago #11182
by orlandoc
Replied by orlandoc on topic call a stored procedure with passing parameter
CREATE TABLE TBL_DATA
(
A VARCHAR(50),
B VARCHAR(24),
X INT IDENTITY(1,1) PRIMARY KEY
)
GO
CREATE PROC tsp_GetWork
(
@P VARCHAR(50)
)
AS
SELECT * FROM TBL_DATA
WHERE A = @P
GO
INSERT INTO TBL_DATA (A,
SELECT 'DANIEL','CANADA'
INSERT INTO TBL_DATA (A,
SELECT 'JUDY','CANADA'
INSERT INTO TBL_DATA (A,
SELECT 'ORLANDO','CANADA'
INSERT INTO TBL_DATA (A,
SELECT 'STEVE','USA'
INSERT INTO TBL_DATA (A,
SELECT 'JEB','USA'
(
A VARCHAR(50),
B VARCHAR(24),
X INT IDENTITY(1,1) PRIMARY KEY
)
GO
CREATE PROC tsp_GetWork
(
@P VARCHAR(50)
)
AS
SELECT * FROM TBL_DATA
WHERE A = @P
GO
INSERT INTO TBL_DATA (A,

INSERT INTO TBL_DATA (A,

INSERT INTO TBL_DATA (A,

INSERT INTO TBL_DATA (A,

INSERT INTO TBL_DATA (A,

Last edit: 9 years 1 month ago by orlandoc.
Please Log in or Create an account to join the conversation.
9 years 1 month ago #11186
by admin
Mike
ETL Architect
Replied by admin on topic call a stored procedure with passing parameter
Theres is no need to use stored procedure in your case
But if you want to you can do something like this
Mike
But if you want to you can do something like this
Mike
Mike
ETL Architect
Please Log in or Create an account to join the conversation.
9 years 1 month ago #11187
by orlandoc
Replied by orlandoc on topic call a stored procedure with passing parameter
my requirement is to pass a GUID to the stored procedure.
Now, how do i generate a GUID and pass it to a variable <VariableName> and pass it to a Data Reader?
Now, how do i generate a GUID and pass it to a variable <VariableName> and pass it to a Data Reader?
Please Log in or Create an account to join the conversation.
9 years 1 month ago #11188
by admin
Mike
ETL Architect
Replied by admin on topic call a stored procedure with passing parameter
Mike
ETL Architect
Please Log in or Create an account to join the conversation.