Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Simple Select Question

Simple Select Question

From: <yong321_at_yahoo.com>
Date: Fri, 21 May 1999 15:37:57 GMT
Message-ID: <7i3ukl$vfg$1@nnrp1.deja.com>


Suppose I have a very wide table (many columns). I want to find all rows with at least one column being 'Y'. My select statement is:

select item_id from mytab where cola='Y' or colb='Y' or...colz='Y'

But this statement is too long for a 30 to 50 column table. Is there an easier way? Thanks.

Yong
Email:yogn321_at_yahoo.com

--== Sent via Deja.com http://www.deja.com/ ==-- ---Share what you know. Learn what you don't.--- Received on Fri May 21 1999 - 10:37:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US