Posted by Steve on 10/05/13 11:36
On Wed, 04 Jan 2006 17:05:27 +0100, Geradeaus wrote:
> I have searched but have not yet found how I can resolve the following
> problem :
>
> SELECT adId,
> CASE
> WHEN adId =1 THEN cityId
> WHEN adId =2 THEN regionId
> END AS extraField
> FROM ad
> WHERE extraField <> 0
>
> The problem is "extraField" cannot be used in the WHERE clause... I am using
> mySQL 4.1
>
> Thanks in advance!
Is there a union in mysql 4.1?
Navigation:
[Reply to this message]
|