- Posts: 26
- Thank you received: 1
Can I use variables in MS SQL Server Store Procedures
2 months 4 days ago #22464
by Albert
Can I use variables in MS SQL Server Store Procedures was created by Albert
Hi I am evaluating Advanced ETL Processor - Enterprise, in one of my imports I get the information through a StoreProcedure with a @ID parameter, I get the @ID value from the target database and I already have it stored in a variable.
How can I use it in the Reader component?
Is it possible?
How can I use it in the Reader component?
Is it possible?
Please Log in or Create an account to join the conversation.
2 months 4 days ago #22465
by admin
Mike
ETL Architect
Replied by admin on topic Can I use variables in MS SQL Server Store Procedures
Hi Albert
Sure we are always happy to help
I assume that you want to use the parameter as a filter ( where field=parameter)
Here is a very basic example.
Stored procedure
CREATE PROCEDURE [dbo].[GetParameter]
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
Select '#PARAMETER#' AS PARAMETER ,'VALUE' AS PARAMETER_VALUE
END
I hope you found my suggestions useful
Working with variables can be tricky for new users
You may find the following article useful
www.etl-tools.com/wiki/aetle/packages/variables
Please ask further questions on our support forum
Sure we are always happy to help
I assume that you want to use the parameter as a filter ( where field=parameter)
Here is a very basic example.
Stored procedure
CREATE PROCEDURE [dbo].[GetParameter]
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
Select '#PARAMETER#' AS PARAMETER ,'VALUE' AS PARAMETER_VALUE
END
I hope you found my suggestions useful
Working with variables can be tricky for new users
You may find the following article useful
www.etl-tools.com/wiki/aetle/packages/variables
Please ask further questions on our support forum
Mike
ETL Architect
Please Log in or Create an account to join the conversation.
2 months 3 days ago #22466
by Albert
Replied by Albert on topic Can I use variables in MS SQL Server Store Procedures
Thank you very much for the explanation, for the moment I have solved all the features that I require,
Thank you very much.
Albert
Thank you very much.
Albert
The following user(s) said Thank You: admin
Please Log in or Create an account to join the conversation.