July 13, 2016, 01:53 PM
Trudy[SOLVED]Returning a single row
I have a procedure that returns multiple rows per ID that counts the number of times the record has been pulled using the following computed logic
HoldCnt/I2= IF LAST ID EQ ID THEN LAST HoldCnt + 1 ELSE 1
So my records look like
ID HoldCnt
332 1
332 2
332 3
654 1
654 2
912 1
912 2
912 3
912 4
I want the output to be
ID HoldCnt
332 3
654 2
912 4
Can anyone help with this?
Thanks
This message has been edited. Last edited by: Trudy, July 13, 2016, 02:38 PM
TrudyThe
SUM CNT.ID BY ID
worked. Didn't really see how I could do the MAX on a COMPUTED field, or am I missing something?
July 14, 2016, 02:08 PM
RSquaredI wasn't sure if it was a defined field or a computed field. I know it works for defined fields, you can try for a computed field.