Update Query

oscarooko

Registered User.
Local time
Today, 12:51
Joined
Oct 18, 2005
Messages
18
I have three columns TU, EFX, XPN a fourth column FICO which is based on the values in TU, EX and XPN.
I need to update the FICO column so that it is either
MEDIAN of TU, EFX, XPN or
Minimum of TU, EFX
Minimum of TU,XPN,
Minimum of XPN, EFX

I expected the SQL statement to be something like

UPDATE Table
SET FICO =MED(TU, EFX,XPN)

UPDATE Table
SET FICO =MIN(TU, EFX)

UPDATE Table
SET FICO =MIN(TU, XPN)

UPDATE Table
SET FICO =MIN(XPN, EFX)

Unfortunatelly,these wont work. I'm using Access 97

Any clues
 
For the first senario try:
UPDATE Table SET Table.FICO = ([TU]+[EFX]+[XPN])/3;

For the next senario try:
UPDATE Table SET Table.FICO = IIf([TU]<[EFX],[TU],[EFX]);

The last two are just variations on the second SQL
 

Users who are viewing this thread

Back
Top Bottom