Guys i'm trying to create row number by dimension (SUKEY)
I'm not getting why, for the SUKEY selected i got row NUmber = 2 ! Should be 1 since is the unique row for that SUKEY.
The script that is generation SuJoinNbr is AutoNumber(RowNo() , SUKey) as SUJoinNbr
Any idea? i'm driving crazy.
Below the full script,
THank you
BolleArchiveDraft: LOAD
SDITM AS SUItem, SDDOCO as SUDoc, SDLOTN AS SULot, SDSHAN AS SULocation, Date(If(Len(Trim(SDADDJ))>4,Date(MakeDate(1900+Floor(SDADDJ/1000))-1+Mod(SDADDJ,1000))), 'DD/MM/YYYY') as SUShipDate, SDSOQS/1000 AS SUQtyDraft, SDSHAN&SDITM&SDLOTN as SUKey, SDDELN as SUDeliveryNumber
;
SQL SELECT sddoco,SDITM,SDLOTN,SDSHAN,SDSOQS,SDADDJ,SDDELN FROM PRODDTA.F42119 WHERE SDLTTR NOT IN ('980','530') AND SDADDJ>120000 AND SDMCU IN (' EIT20',' EIT21',' EIT25') AND SDDCTO IN ('SU') AND SDDELN<>0 AND SDSOQS>0 and sdshan=233870
ORDER BY SDADDJ,SDSHAN,SDITM,SDLOTN DESC ;
BolleArchive: Load SUItem, SUDoc, SULot, SULocation, SUShipDate, SUDeliveryNumber, SUKey, SUKey&AutoNumber(RowNo(), SUKey) as SUJoin, AutoNumber(RowNo() , SUKey) as SUJoinNbr, '1' as SUQuantity RESIDENT BolleArchiveDraft While IterNo() <= SUQtyDraft ;