I have a flow that i am trying to setup dynamically and i have two pieces of the flow.
Part 1 - Focus Code:
-SET &&PAY3MONTH = '';
-SET &3Month = '';
-SET &OneMonthAgo = '';
-SET &OneMonthAgo = DATECVT(&YYMD,'I8YYMD','YYMD');
-SET &OneMonthAgo = DATEADD(&OneMonthAgo, 'M', -3);
-SET &OneMonthAgo = DATECVT(&OneMonthAgo,'YYMD','A8YYMD');
-SET &3Month = EDIT(&OneMonthAgo,'9999-99-99');
-SET &&PAY3MONTH = &3Month;
Part 2 - Data Flow
It has a source and target and in the where clause i have:
WHERE T1.FIELDNAME >= '&&PAY3MONTH'
When it runs i get the error:
DEP_4 fact_mt_payroll Return Code = 8
Note that when use a field in the table T1 it all works.
Thanks for all the help!This message has been edited. Last edited by: Tamra,
WebFocus 8.02, SQL Server 2008r2
How are you invoking the stored procedure (focexec) that sets the global variables and the data flow that uses them? Both must be in the same agent.
You ensure this by either:
(a) Open the data flow and click on the process flow tab. Delete the connection from start to the (purple) data flow. Drag in the stored procedure between start and data flow and connect them.
(b) Create a new flow and click on the process flow tab. Drag the stored procedure and data flow in. Connect Start to procedure to (blue) data flow. Double click on data flow and check "Run as Stored Procedure."
|Powered by Social Strata|