Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Firends,
I have following data table together with part of data load script
From the above script a field (RNFLG) is created. Now what I want is to'RN' to record in the last record as well. To do that I want to skip the record (2nd from last) and want to match my condition with the 3rd row from last record so that all condition in my script match and last record will be marked as 'RN' . But I do not know how to skip one record and to peek the next record. Pls help me get my script corrected.
It's your third condition of peek('FLG') which prevents that you get 'RN' in the last record. This means you need to decide to remove this condition or to adjust it maybe with an additionally match() to query multiple values.
If this isn't wanted you will need to extend your logic to query which of the records is the first, n-th and/or the last.
- Marcus
Thanks,
But the all records and flag value should remain as it is and I want to skip the 2nd record and peek the 3rd record. Is it possible ? If not will you suggest an alternative please.
Like above mentioned you need to develop a logic which queries the order of your records. With it you could bypass this condition or you might use them to pick your wanted records - with the second parameter of peek() you could define which record should be picked.
Quite probably you couldn't do it with a single load - at least not querying the records and applying the information within a condition or a peek() - else you might need multiple (preceeding) loads in a chain and/or several loads which implement some kind of row-counter with autonumber(rowno(), Field1 & Field2) and/or query the min/max/first/last values and are then joined/mapped to the origin load/table.
- Marcus