Can I use variables in MS SQL Server Store Procedures

More
5 months 3 weeks ago #22464 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?

Please Log in or Create an account to join the conversation.

More
5 months 3 weeks ago #22465 by admin
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

Mike
ETL Architect

Please Log in or Create an account to join the conversation.

More
5 months 3 weeks ago #22466 by Albert
Thank you very much for the explanation, for the moment I have solved all the features that I require,

Thank you very much.
Albert
The following user(s) said Thank You: admin

Please Log in or Create an account to join the conversation.