In one line:

update mytable set X = B*(minimum(A,C)-C)/(A-C)+D*(minimum(A,C)-A)/(C-A)

If A=C, the record will not be updated. That should also be like
requested, but you get a division by 0 error.

Kind regards

Uffe Kousgaard
www.routeware.dk

----- Original Message ----- 
From: "Lathrop, Travis C [PCS]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, October 30, 2003 4:06 PM
Subject: MI-L Update Column Help


I want to update column x with either column B or D.  I want MapInfo to
compare column A and column C to decide whether to populate x with B or
D.  Basically something to the effect of:

Update X with B if A<C or Update X with D if C<A.......

Can someone please tell me if I am missing something?

Travis Lathrop
Intercarrier Services
913-762-8064



---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 8964

Reply via email to