This selection is based on a higher file in the ACCESS list
Richard Witkopp
witkopp@idt.com
Thu, 28 Jan 1999 10:20:18 -0800
A nasty, cludgey way would be to define your report fields
like DEF FLD1 CHAR*20 = TRANS_DATA IF AID OF SARTYPE-DATA = "Y",
etc.
> >Why can't you select a record structure given criteria in it
> is linked to?
> >
> >Example:
> >
> >Access *IDNUMS link to TRANSACTION-DATA link to SARTYPE-DATA
> >Select TRANSACTION-DATA if AID of SARTYPE-DATA = "Y"
> >
> >I need to be able to report every record from IDNUMS and
> include any aid
> >transactions (if they exist). What is the workaround? Do I
> have to create
> >yet another subfile?
>
> Either "SELECT IF ..." or "SELECT SARTYPE-DATA IF ..." will work.
> SELECT <name> IF ... enables you to reject an entire 'tree'
> of record complexes
> on a condition determined from a root record, saving Quiz
> from having to read
> (potentially many records) from lower files.
>
> I think the Quiz compiler performs the same optimisation for
> the unqualified
> SELECT statement (when possible) these days.
>
> You're aware that if there aren't any matching (selected)
> SARTYPE-DATA records,
> you won't see the corresponding IDNUMS and TRANSACTION-DATA ?
> There's the
> optional keyword if you want to see a record complex with
> missing records.
>
> Access *IDNUMS link to TRANSACTION-DATA opt link to SARTYPE-DATA opt
> >Select TRANSACTION-DATA if AID of SARTYPE-DATA = "Y" ; *** error ***
>
> If this is what you want, then yes, you need another pass &
> another subfile.
> I don't know exactly how the hierarchy of OPTIONAL works, but
> I don't think
> you can construct the access/select to include all IDNUMS but
> reject all
> non-aid transactions in a single pass, unless anyone knows better ?
>
> Access *IDNUMS link to TRANSACTION-DATA opt link to SARTYPE-DATA
> Select SARTYPE-DATA if AID of SARTYPE-DATA = "Y"
>
> Would this reject complexes with non-aid transactions, but
> allow IDNUMS with no
> aid transactions ?
> ______________________________________________________________________
> Chris Sharman Chris.Sharman@CCAgroup.co.uk
> CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.
> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
> = = = = = = =
> Subscribe: "subscribe powerh-l" in message body to
> majordomo@lists.swau.edu
> Unsubscribe: "unsubscribe powerh-l" in message to
> majordomo@lists.swau.edu
> powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
> This list is closed, thus to post to the list, you must be a
> subscriber.
>
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
powerh-l@lists.swau.edu is gatewayed one-way to bit.listserv.powerh-l
This list is closed, thus to post to the list, you must be a subscriber.