Update Table Querry

oscarooko

Registered User.
Local time
Today, 02:21
Joined
Oct 18, 2005
Messages
18
I have a table in access. The columns are State, FICO, LTV, DTO,LBI and Grade need to update the column (Grade) so that it gets the values A, B, C or D based on the following conditions

If FICO >525 and LTV <100 AND DTI <50 then grade = D
IF FICO >600 AND LTV BTWN 90 -100 AND DTI <50 Grade =c
If FICO >600 AND LTV <90 AND DTI<45 Grade =B
IF FICO >680 AND LTV <90 AND DTI<45 grade =A
IF FICO >720 AND LTV <100 AND DTI<50 Grade =A

Please help me figure out the ACCESS select querry for this.
 
UPDATE MyTable
SET Grade = "D"
Where FICO between 525 AND 599
AND LTV < 100
AND DTI < 50

UPDATE MyTable
SET Grade = "C"
Where FICO between 600 AND 679
AND LTV between 90 and 100
AND DTI < 50

UPDATE MyTable
SET Grade = "B"
Where FICO between 600 AND 679
AND LTV < 90
AND DTI < 45

UPDATE MyTable
SET Grade = "A"
Where (FICO between 680 AND 719
AND LTV < 90
AND DTI < 45)
OR (FICO > 720
AND LTV < 100
AND DTI < 50)
 
Thanks for the insight FoFa.
 

Users who are viewing this thread

Back
Top Bottom