Multiple key access in Quick

Chris Sharman Chris.Sharman@ccagroup.co.uk
Fri, 16 Jul 1999 08:43:59 +0100


>Is it possible to access a detail file by more that one key at a time?  Or
>do I have to create a new concatenated key of the two keys?
>
>Eg.
>FILE TRANS-DTL DESIGNER
>     ACCESS VIA KEY1,KEY2 USING FIELD1,FIELD2
>
>Or is below my only option
>
>FILE TRANS-DTL DESIGNER
>     ACCESS VIA KEY12 USING (FIELD1 + FIELD2)
>
>The later means database and data changes that I really don't want to do.

It probably depends on your filesystem/database. On VMS/RMS, a character
key can have up to 8 separate segments, which may do what you want. We
use this from Powerhouse with syntax as your first example.

Alternatively:
 access via key1 using field1
 select if (key2=field2)

or vice versa, depending which access will find least. This will work
on any database, although how well it performs will depend on the data.

Chris
______________________________________________________________________
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.