I have columns like TRAN_LID_AM,TRAN_TYPE_CD and EXT_CM_NO.
The column TRAN_TYPE_CD have values 'D' and 'C'.
The EXT_CM_NO represents card-no and we need to sum up all TRAN_LID_AM with TRAN_TYPE_CD as 'D' and again sum up all TRAN_LID_AM with TRAN_TYPE_CD as 'C'. After which we need to output EXT_CM_NO who are having the summed up value of 'D' minus the summed up value of 'C' as positive.
Joined: 23 Nov 2006 Posts: 19270 Location: Inside the Matrix
In addition to the rules description, it will help if you post some sample columns with values that demonstrate the rules and the output you want from the posted input. Make sure the sample data includes all possibilities and that the sample output corresponds with the input.