If you have TRACK installed, that'll answer the question on an ad-hoc basis without any further programming effort on your part. Otherwise, if
it were me and I were looking for a reliable, "programmable" interface I reckon I'd be starting to think about writing an extension to QUERY ...
