Hello everyone,
Please some one help me in the below challenge with SQL and SSIS variable length issues.
Issue Description :
I am trying to access the Select query from SSIS with Variable as a source and this variable value will be coming out of a stored procedure.
Step 1 : call the SP from execute SQL task , store the SP outPut into SSIS variable. So issue here is Declaring NVARCHAR(MAX) as Output variable is not accepting in SSIS.
DECLARE @Query NVARCHAR(MAX) --> issue here
EXEC SP_Name ?,?, @Query OUTPUT
Select @Query
If i declare this as NVARCHAR(4000), Full outPut variable out of SP is not sufficient and i am getting 80% of the select query which is wrong.
Is this the limitation here as we can't declare more than 4000 length stings in SSIS when we are calling the SP from execute SQL task? In this case is there any alternatives for this ?
I know if we copy the full query in the Data Flow Task, it is working. but this is not the scenario for me here.
Many thanks in advance for any suggestions .