Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: IIf Else SQL help

0 views
Skip to first unread message

Douglas J. Steele

unread,
Aug 7, 2004, 10:22:52 AM8/7/04
to
So what's your question?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Tak" <T...@discussions.microsoft.com> wrote in message
news:AF100A17-9743-42AF...@microsoft.com...
> I am trying to write an If Else statement in SQL for a query in Access
2003
> for managing GPA
> Example:
> If there is no score entered yet, assign 0
> If the first score is >= 90, use the first score
> If the second score is >= 90, assign 90 (can't score higher than 90 on
retake)
> Else assign the greater of the two scores (since neither are 90 or higher)
>
> Here is an example of my code so far
> IIf(IsNull([L1 E1 1st]),0,
> IIf([L1 E1 1st]>=90,[L1 E1 1st],
> IIf([L1 E1 2nd]>=90,90,
> IIf([L1 E1 1st] >= [L1 E1 2nd],[L1 E1 1st],[L1 E1 2nd]))))
> AS [L1 E1 Score],
>
>
>


0 new messages