>>Actually he's trying to use a boolean expresion in a simple case statement. I was correcting my answer when you replied. Sergey already gave him the correct answer.
>>
>>
>I did too just few seconds later. I didn't see Sergey's response when I replied.
Yes you did!
Sergy's fast, half the time I go to answer something in the VFP area and he's already done it.
Since both whens return the same value I don't see what was wrong with Sergey's first answer.
CASE WHEN (TRANCODE = 'PR') OR (TRANCODE = 'PT' AND TRANQUANT > 0) THEN TRANQUANT
ELSE 0 END AS Recepit