Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Peek is a function I have not used before so really not sure how it works or even if its correct in the scenario.
I am looking to load the highlighted data only (2nd newest R and newest R.
PLY_COVERNUMBER AND PLY_VERNO can be anything in the table.
Once I have this data I am looking to review billing quality within those dates.
Thanks in advance.
Rob
| PLY_COVERNUMBER | PLY_VERNO | PLY_INVOICENO | PLY_TRANSACTIONTYPE | PLY_RENDATE |
| 0023880 | 019 | 00527256 | R | 16-Jan-12 |
| 0023880 | 020 | 00589936 | R | 16-Jan-13 |
| 0023880 | 021 | 00650189 | R | 16-Jan-14 |
| 0023880 | 022 | 00650950 | R | 16-Jan-14 |
| 0023880 | 023 | 00650953 | E | 16-Jan-14 |
| 0023880 | 024 | 00702298 | R | 16-Jan-15 |
| 0023880 | 025 | 00750819 | R | 16-Jan-16 |
| 0023880 | 026 | 00752459 | R | 16-Jan-16 |
| 0023880 | 027 | 00752463 | E | 16-Jan-16 |
| 0023880 | 028 | 00794733 | R | 16-Jan-17 |
| 0023880 | 029 | 00797027 | E | 16-Jan-17 |
| 0023880 | 030 | 00797028 | E | 16-Jan-17 |
| 0023880 | 031 | 00834423 | R | 16-Jan-18 |
| 0023880 | 032 | 00752463 | E | 16-May-18 |
The most important thing by using interrecord-functions like peek() or previous() is an appropriate sorting (only possible within a resident load) of the data - in your case probably the fields PLY_COVERNUMBER, PLY_TRANSACTIONTYPE, PLY_VERNO and/or PLY_RENDATE. A very good explanation how it worked is this one: Peek() or Previous() ?
- Marcus