Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to make a FLAG appear?
dolans_at_my-deja.com wrote:
>
> I have two tables A and B where I want to return
> the data from A and a FLAG of a 0 or 1 from table
> B only IF there exists something in B. The
> reason is that table B is of LONG data and I
> don't want to return it unitl the user chooses to
> view it, so I want a button that appears if the
> FLAG is true. How do you do it? Here is my
> query that almost works below:
>
> SELECT ALL a.DATE_START, a.DATE_FINISH,
> b.DESCR
> FROM tableA a, tableB b
> WHERE a.EVENT_ID=1
> AND (b.EVENT_ID(+)=a.EVENT_ID);
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Try this:
SELECT ALL a.DATE_START, a.DATE_FINISH,
decode(b.EVENT_ID,NULL,0,1)
FROM tableA a, tableB b
WHERE a.EVENT_ID=1
AND (b.EVENT_ID(+)=a.EVENT_ID);
--
Don Sparkman _/_/_/_/ sparkman_at_GNNcast.net _/ _/ _/_/_/ _/ _/ GNN _/ _/ _/ _/ _/_/ _/ 1175 Peachtree Street N.E. _/ _/ _/ _/ _/ _/ _/ 100 Colony Square Suite 2400 _/ _/ _/ _/ _/ _/_/ Atlanta, GA 30361 _/_/_/_/ _/_/_/ _/ _/ 404-266-8500 FAX: 404-266-3999 http://www.issi.net/~sparkman/ TIME is a scrambled ITEM. :)Received on Mon Oct 04 1999 - 22:22:45 CDT