Re: Using UNION inside a cursor - Mailing list pgsql-sql

From Paul Ganainm
Subject Re: Using UNION inside a cursor
Date
Msg-id MPG.1a11c99fb139af0989699@news.gmane.org
Whole thread Raw
In response to Using UNION inside a cursor  ("Kumar" <sgnerd@yahoo.com.sg>)
List pgsql-sql
sgnerd@yahoo.com.sg says...


>  (SELECT  * FROM history  WHERE obs_type = \'AA\' )
>  UNION 
>  (SELECT  * FROM  history  WHERE   obs_type = \'TA\');


Maybe I'm just confused here, but what's to stop you using 

SELECT * FROM History WHERE (Obs_Type = \'AA\' AND Obs_Type = \'TA\')


? Or have I missed something really obvious?


Paul...


-- 

plinehan__AT__yahoo__DOT__com

C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04 W2K Pro

Please do not top-post.



pgsql-sql by date:

Previous
From: Jodi Kanter
Date:
Subject: query assistance
Next
From: Richard Huxton
Date:
Subject: Re: query assistance