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: WHERE IN query

Re: WHERE IN query

From: <tabates_at_my-dejanews.com>
Date: Mon, 26 Apr 1999 18:22:43 GMT
Message-ID: <7g2atd$re3$1@nnrp1.dejanews.com>


  "Arjan van Bentem" wrote:
> Timothy wrote
> > Select * from Table
> > where ID||Name in (select ID2||Name2 from Table2)
>
> Secondly, and by far more important: surely a day comes when someone enters a
> value for name that starts with a digit. I really think it is bad practice to
> use such combined keys, unless really needed.

I hadn't anticipated that situation.

ID       Name
1        2Timothy
12       Timothy

would both match based on my suggestion.

So unless you have controls that prohibit Name from starting with a number, I would advise against my initial suggestion. Thanks to Arjan for pointing out this potential pitfall.

Timothy

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Mon Apr 26 1999 - 13:22:43 CDT

Original text of this message

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