Hi all;
I have a situation where I have a table that is linked to two sources for location information.
The first table is called APBLD and it has a one to many relationship with an address table called ADDR2 through the field ADDRKEY.
The other relationship is also a one to many between APBLD and a table called PARCEL through the field PARCLKEY
Basically, the APBLD table is a table of building permits issued, and they are either coded to an address (ADDR2) or to a proerty identifier (PARCEL) even though both may exist.
To make things a bit more complicated, the ADDR2 table and the PARCEL table have a one to many relationship through another table called ADDRPRCL which has both the ADDRKEY and the PARCLKEY.
So, what I want to do, is create a query that lists all permits and if the link with the APBLD table is through the ADDRKEY, I want to see the following fields from the ADDR2 table (STNO, STNAME) but if the link was through the PARCLKEY, I want to see the following field from the PARCEl table (PID).
It sounds kind of simple when I write it down but I can't seem to get it to run properly without getting an error because of my joins.... can any one help???
Thanks!
I have a situation where I have a table that is linked to two sources for location information.
The first table is called APBLD and it has a one to many relationship with an address table called ADDR2 through the field ADDRKEY.
The other relationship is also a one to many between APBLD and a table called PARCEL through the field PARCLKEY
Basically, the APBLD table is a table of building permits issued, and they are either coded to an address (ADDR2) or to a proerty identifier (PARCEL) even though both may exist.
To make things a bit more complicated, the ADDR2 table and the PARCEL table have a one to many relationship through another table called ADDRPRCL which has both the ADDRKEY and the PARCLKEY.
So, what I want to do, is create a query that lists all permits and if the link with the APBLD table is through the ADDRKEY, I want to see the following fields from the ADDR2 table (STNO, STNAME) but if the link was through the PARCLKEY, I want to see the following field from the PARCEl table (PID).
It sounds kind of simple when I write it down but I can't seem to get it to run properly without getting an error because of my joins.... can any one help???
Thanks!