Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Like value from other table
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Steve Howard wrote:
> On Sep 21, 5:57 pm, Tony B <anthonybro..._at_googlemail.com> wrote:
>> In Access I often used the "Like" statement to query Table 1 with a >> value from table 2 like this: >> >> SELECT tblcompany.IDcompany, tblcompany.Company, tblcompany.Pcode, >> tblseller.IDSeller, tblseller.SellerNAme >> FROM tblcompany, tblseller >> WHERE (((tblcompany.Pcode) Like [tblseller]![Pcode_1] & " *")); >> >> What is the correct syntax for doing this in Oracle.
The correct attitude is to denormalize your model. That, in turn,
requires knowledge of data analysis and modeling techniques, as
well as database knowledge. No one here will regard Access a
database, so you have a log way ahead of you.
>
> Hi Tony,
>
> The % is a wildcard in Oracle.
>
> http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/sql_elements003.htm#i11223
>
Not just Oracle - it's the standard (multi character) wildcard character. '_' (underscore) is the standard single character wildcard.
Top-posting is one way to shut me up...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (MingW32)
iD8DBQFG9VrRLw8L4IAs830RAuB1AJ0dJI3017n+dI3rm7aQeJ/iTIVpfgCgnfie
taeeWIqprv8ReS6nSf34RLY=
=pS0I
-----END PGP SIGNATURE-----
Received on Sat Sep 22 2007 - 13:11:29 CDT