SELECT [Politicians].[Surname], [Politicians].[ChristianName],
[Claims].[Claim], [Claims].[Card],
CASE Claims.Card
WHEN 'VISA' THEN Politicians.VISA_EXPIRY
WHEN 'MASTER' THEN Politicians.MASTER_EXPIRY
WHEN 'BANKCARD' THEN Politicians.BANKCARD_EXPIRY
END AS Expiry
FROM Politicians, Claims
WHERE Claims.ID = Politicians.ID
AND Claims.Claim = '*DINNER*'
The idea here is that if Claims.Card = whatever, choose the corresponding
expiry date from the Politicians table. I did the CASE part exactly the
same way as I've seen it done in the MSDN manual, and everywhere else I've
looked, and it says there's a missing operator near Claims.Card. I'm so
frustrated... and this thing is due tomorrow, AND my hard drive crashed last
night so I had to start again. Does anyone have any idea what I'm doing
wrong?
btw my ISP is a budget piece of shit, I can't even get a list of posts from
newsgroups... so I dunno if I'll be able to read replies (if there are any)
Thanks in advance,
-stew