RE: Field Relationships
- From: "tino" <tino@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 27 May 2005 07:40:01 -0700
Hello Nadia,
i am a newbie in this community too, but i try an answer:
1. Create 4 queries from your 4 basic tables, everyone with one additional
field :
expr_for_join: MID(STR_ID;2;5)
etc
2. join these queries instead of the tables on the additional fields
If MID() doesnt works, because you have to use in record one the 2..6 th
char, in record two the 4...8 char and so on you can write a function in a
module :
function GetKeyForJoin( sbasic as string) as string
' extract the key here
end function
and use in the queries for the additional field
expr_for_join : GetKeyForJoin([STR_ID])
But this solution is VERY slow !
Perhaps you can use this in an UPDATE - Query :
UPDATE .... SET newfield_for_join = GetKeyForJoin([oldfield])
Hope this helps !
Tino
"Nadia" wrote:
> Hello and thank you in advance to anyone who may assist me.
> This will be the first of a few posts I will be making.
>
> I am trying to query data between 4 tables (Line, Load, Fuse, Recloser).
>
> The fields I'm attempting to join are:
> Line!STR_ID
> Load!NAME
> Fuse!STR_ID
> Recloser!STR_ID
>
> My problem is that no exact unique identifier field exists between the
> tables in these fields. But there is a five-digit circuit number buried
> within each these fields that match up. i.e. STR_ID= "Z12345-7788996" the
> circuit number is always before the hyphen so in this case it is "12345".
>
> The proceeding numbers vary within the fields along with the leading
> alphabetic character. Is there any possible way to join these tables so I
> may extract data?
>
> Or...
> The only way I have thought possible so far is to make another field within
> each table. By doing this I'd copy and paste each field listed above into
> Excel and find a way to grab the circuit number out of the data. I know
> there is a way to do this as well but I can't remember.
>
> Please help ASAP!
>
> Thanks.
>
> --
> Nadia
.
- References:
- Field Relationships
- From: Nadia
- Field Relationships
- Prev by Date: RE: Visual Basic
- Next by Date: RE: Update query or VBA request
- Previous by thread: Field Relationships
- Next by thread: Re: Field Relationships
- Index(es):
Relevant Pages
|