>I don't know how to explain this real well:
>This is what I have:
>USE D:\Work\client\fossil_creek\lanproconversion1\for_luigi\use\stage5\legals.dbf In 0 Shared Again
>USE D:\Work\client\fossil_creek\lanproconversion1\for_luigi\use\stage5\leases.dbf In 0 Shared Again
>UPDATE leases SET leases.legal_desc = "Tract: " + TRIM(legals.tract_id) + CHR(13) + TRIM(legals.township) + CHR(32) + TRIM(legals.range) + CHR(32) + TRIM(legals.section) + CHR(13) + TRIM(legals.tract) ;
> FROM leases INNER JOIN legals ON Lower(Alltrim(leases.lease_id)) == Lower(Alltrim(legals.lease_id))
>
>What I want it to get the tract legal descriptions into the lease legal desciptions, but in many cases there is more than one tract per lease. I would like to see the descriptions of each tract associated with a lease. What do I do?
One approach (pseudocode):
SELECT Leases
SCAN ALL
m.Lease_ID = Leases.Lease_ID
SELECT ;
FROM Legals ;
WHERE Lower(Alltrim(legals.lease_id)) == m.Lease_ID ;
INTO CURSOR LeaseLegals
m.TractInfo = ""
SELECT LeaseLegals
SCAN ALL
m.TractInfo = m.TractInfo ;
+ (however you want to build up the string/memo here)
ENDSCAN
USE IN LeaseLegals
UPDATE Leases ;
SET legal_desc = m.TractInfo ;
WHERE Lower(Alltrim(legals.lease_id)) == m.Lease_ID
ENDSCAN
Regards. Al
"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov
Neither a despot, nor a doormat, be
Every app wants to be a database app when it grows up