Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Using LIKE with IN on an expression
Grant wrote:
> Hi > > I should have qualified my earlier question... I am attempting to pass > a variable containing multiple selections from a list box ( and in > one instance , a string of comma delimited entries from a user text > box.) I am kinda new to Oracle and wasn't sure whether I needed to > use LIKE in conjunction with IN on the statement. As I understand, > LIKE is a good way to broaden the range of possible returns, whereas > IN is the way to enumerate and compare a list of values for a return. > I was thinking that I could apply the benefit of LIKE on each member > in the list collection. Im not really sure if that matters with an > IN clause or not. If I say "IN ('%MyVarList%') I am not sure if it > is constrained to an exact match or not) If I use LIKE with it, > wouldn't that be less constrained on the matching criteria? > > Sorry if this sounds screwy...I am still novice to the DB world > > > Thanks > > On Jan 26, 5:09 pm, "Steve Howard" <stevedhow..._at_gmail.com> wrote:
What you are looking for can be found at:
www.psoug.org
click on Morgan's Library
click on Conditions
scroll down to "Complex IN Demo"
You will need to prepare the value of your variable to look like the one in the demo.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Sat Jan 27 2007 - 15:12:57 CST