Its schema is given below.
Code: Select all
PROD_ID VARCHAR2(11 CHAR)
NAME VARCHAR2(50 CHAR)
PRICE VARCHAR2(5 CHAR)
GROUP_CODE VARCHAR2(4 CHAR)
My intention is to use the looping feature of tranformer stage and create a sub total of the column PRICE for each DISTINCT value of GROUP_CODE column.
I created two stage variables and used the following experssions for them :
PRICESUM=If LastRowInGroup(DSLink4.GROUP_CODE) Then 0 Else PRICESUM + DSLink4.PRICE
PRICETOTAL=If LastRowInGroup(DSLink4.GROUP_CODE) Then PRICESUM + DSLink4.PRICE Else 0
The datatypes for the above stage variables are Varchar.
The problem I am facing is that the values of these stage variables are not getting evaluated properly.
Can anyone please help me on this ?
Thanks
Kumarjit.