Linking tables
brian_matthewsbrian matthews
brian_matthews_bmw@hotmail.com
Wed, 29 Sep 2004 23:36:18 +0000
or possibly something like ( its difficult without some examples of data )
ACCESS * thesubfile &
LINK field1 OF thesubfile , &
field2 OF thesubfile &
TO field1, field2 OF PRV ALIAS phys OPTIONAL &
LINK field1 OF thesubfile &
TO field1 of PRV ALIAS clinic OPTIONAL
select clinic if field2 of clinic = " "
select phys if field2 of phys ne " "
rep docname of PRV cinicname of clinic
>From: "David Morrison - Corporate" <dmorrison@mcbrideelectric.com>
>To: "Kristina Carlton" <Kristina.Carlton@JICompanies.com>,
><powerh-l@lists.sowder.com>
>Subject: RE: Linking tables
>Date: Wed, 29 Sep 2004 15:07:50 -0700
>
>Kristina,
>
>I'd specify the linkage fields:
>
>ACCESS PRV &
> LINK field1 OF PRV, &
> field2 OF PRV &
> TO field1, field OF PRV ALIAS PRV1 OPTIONAL
>
>CHOOSE VIAINDEX PRVINDEX
>
>David Morrison
>McBride Electric
>
>
>-----Original Message-----
>From: powerh-l-admin@lists.sowder.com
>[mailto:powerh-l-admin@lists.sowder.com]On Behalf Of Kristina Carlton
>Sent: Wednesday, September 29, 2004 2:55 PM
>To: powerh-l@lists.sowder.com
>Subject: Linking tables
>
>
>
>Hi List,
>
>I am using OpenVMS v7.3-2 and Quiz V7.10.G4.
>
>My intention is to link to a table twice but link on different fields. The
>table is self-referencing and contains physician information. Each
>physician has a tin (FEIN) and a sub tin (provider within a facility). If
>the physician works for a clinic he would be listed with the clinic's tin
>plus a sub tin, but the name field would contain his name. The clinic has
>no sub tin.
>
>In the case of a physician having his own practice he would be listed twice
>with the same tin, but once without a sub tin and once with a sub tin. Each
>record will have the same name. This would look as follows:
>
>TIN SUB TIN NAME
>75-261977 Victory Medical Services
>75-261977 001 Dr. Franklin
>75-261977 002 Dr. Garcia
>and so on
>
>75-269999 Dr. Williams
>75-269999 001 Dr. Williams
>
>I need to link to this file twice in order to get the physician's name as
>well as the clinic name and also to determine if it is a clinic or an
>individual. The physician file (PRV) has a combo key on tin/sub tin. The
>file I am linking to has tin and sub tin as well. I want to link to it once
>by tin and sub tin and that part is no problem. However, when I attempt to
>link to it again (giving an alias) with tin only, I get the following error
>message:
>
>Access PRV viaindex PRV_KEY0.
> ^
>*E* Expected: <file>
> > TO TIN_NUM OF PRV ALIAS PRV1
> ^^
>
>Can someone tell me what the correct syntax is? Also, the other file I am
>linking to is a subfile, not a database table.
>
>Thanks,
>-Kristina
>Ext. 2459
>
>
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger