Re: sql statement question

From: Ignacio Vazquez (ivazquezATorioncommunications.com)
Date: 01/28/04


Date: Wed, 28 Jan 2004 06:13:35 -0500

Pascal Schmidt-Volkmar wrote:

> Now I would like to gather those datasets, where KANT_ANTWORT for
> KANT_KRIT_ID 1 is 1 and where KANT_ANTWORT for KANT_KRIT_ID 2 is 1.
>
> Using:
>
> SELECT KANT_PLATZ FROM T_KANT WHERE
> ((KANT_KRIT_ID = 1 AND KANT_ANTWORT = 1) AND
> (KANT_KRIT_ID = 2 AND KANT_ANTWORT = 1))
>
> shows no datsasets although both KANT_PLATZ 1 & 2 fit to this
> statement. What am I doing wrong??

Simple. KANT_KRIT_ID can't be both 1 AND 2 at the same time. It can
however be 1 OR 2. Change the middle AND to an OR.

-- 
Cheers,
  Ignacio