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 -> Re: Like clause queries

Re: Like clause queries

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Fri, 17 Jan 2003 10:48:11 -0800
Message-ID: <3E284FEB.A787B50E@exesolutions.com>


Sam wrote:

> I have two queries
>
> select T1_Field1 from T1 where T1_Field2 like "deptname"
>
> select * from T2 where T2_Field2 like T1_Field1
>
> Is there anyway to combine these two queries to one?

No.

One query selects a single field. The other, I presume, multiple fields.

If the fields were the same in terms of datatype and number you could use UNION or UNION ALL

But with respect to your first query you can do: LIKE "deptname"

It is either
= 'deptname'
or it is
LIKE '%deptname%'

Daniel Morgan Received on Fri Jan 17 2003 - 12:48:11 CST

Original text of this message

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