Article View: bit.listserv.sqlinfo
Article #298The LIKE operator in a subquery
From: Melvyn Rosengarden
Date: Sun, 30 Sep 2001 01:38
Date: Sun, 30 Sep 2001 01:38
18 lines
1613 bytes
1613 bytes
Can the LIKE operator be used with anything OTHER than a quoted literal
string ?
I want a subquery to return a column value (expression) I can use as part of
a LIKE statement in the outer query. For example
Select * from Table-A
where Column1 LIKE =(
Select column2 from Table-B where
key = 123 ) || %
Can someone please tell me if this possible to do and if so HOW ???
--
Never be afraid to try something new.
Remember that amateurs built the ark.
Professionals built the Titanic.
Technical Details
Message-ID:
<FIut7.572593$EF2.80629563@typhoon.nyroc.rr.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!netnews.com!xfer02.netnews.com!newsfeed1.cidera.com!Cidera!cyclone.nyroc.rr.com!cyclone-out.nyroc.rr.com!typhoon.nyroc.rr.com.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11355a,54cf9b135c5e2523,start X-Google-Attributes: gid11355a,public X-Google-ArrivalTime: 2001-09-29 18:39:55 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!netnews.com!xfer02.netnews.com!newsfeed1.cidera.com!Cidera!cyclone.nyroc.rr.com!cyclone-out.nyroc.rr.com!typhoon.nyroc.rr.com.POSTED!not-for-mail From: "Melvyn Rosengarden" <melrose@rochester.rr.com> Newsgroups: bit.listserv.sqlinfo Subject: The LIKE operator in a subquery Lines: 21 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <FIut7.572593$EF2.80629563@typhoon.nyroc.rr.com> Date: Sun, 30 Sep 2001 01:38:45 GMT NNTP-Posting-Host: 24.161.65.87 X-Complaints-To: abuse@rochester.rr.com X-Trace: typhoon.nyroc.rr.com 1001813925 24.161.65.87 (Sat, 29 Sep 2001 21:38:45 EDT) NNTP-Posting-Date: Sat, 29 Sep 2001 21:38:45 EDT Organization: Time Warner Road Runner - Rochester NY