Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread how to update the children of a parent
Fri, Jan 11 2008 10:38 AMPermanent Link

Jerry Blumenthal
I have 2 tables joined in a one to many.  I want to change the values in
the 2nd table depending on the value of a field in the parent, and I
dont know how to do that.

I can SHOW the records in question with a SELECT statmeent:

  SELECT Patient.Balance,
         Patient.LastName,
         Tcharges.T_link,
         Tcharges.T_billpatient,
         Tcharges.T_billinsurance
    FROM "C:\z24\GAIL24\pbsw24\data\patient.dat" Patient
         INNER JOIN "C:\z24\GAIL24\pbsw24\data\Tcharges.DAT" Tcharges
                 ON Patient.Acct = Tcharges.T_acctnum
   WHERE (Patient.Balance = 0)

How do I do the UPDATE command?

Jerry Blumenthal
Fri, Jan 11 2008 2:17 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Jerry,

<< I have 2 tables joined in a one to many.  I want to change the values in
the 2nd table depending on the value of a field in the parent, and I dont
know how to do that. >>

It's similar to the SELECT:

UPDATE "C:\z24\GAIL24\pbsw24\data\Tcharges.DAT" Tcharges SET <Set values
here>
FROM "C:\z24\GAIL24\pbsw24\data\Tcharges.DAT" Tcharges
INNER JOIN "C:\z24\GAIL24\pbsw24\data\patient.dat" Patient ON Patient.Acct =
Tcharges.T_acctnum
WHERE (Patient.Balance = 0)

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Jan 11 2008 4:38 PMPermanent Link

Jerry Blumenthal
Thanks Tim. I really appreciate the help.
Jerry


Tim Young [Elevate Software] wrote:
> Jerry,
>
> << I have 2 tables joined in a one to many.  I want to change the values in
> the 2nd table depending on the value of a field in the parent, and I dont
> know how to do that. >>
>
> It's similar to the SELECT:
>
> UPDATE "C:\z24\GAIL24\pbsw24\data\Tcharges.DAT" Tcharges SET <Set values
> here>
> FROM "C:\z24\GAIL24\pbsw24\data\Tcharges.DAT" Tcharges
> INNER JOIN "C:\z24\GAIL24\pbsw24\data\patient.dat" Patient ON Patient.Acct =
> Tcharges.T_acctnum
> WHERE (Patient.Balance = 0)
>
Image