Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Substitute for SUBSTR
On Jun 12, 7:57 am, Buck <BuckTheManTurgid..._at_gmail.com> wrote:
> > It seems a bit odd that an ERP package does not allow the use of SUBSTR. Try this:
> > SELECT
> > T_1.*
> > FROM
> > T_1,
> > T_2
> > WHERE
> > T_2.REF_POSID LIKE T_1.POS_NR||'%';
>
> I thought of that, but apparently the "||" is an Oracle construct, not
> ANSI, and it is not allowed.
>
> I haven't posted in the Oracle group for a few years. That Sybrand
> guy, wow, is he STILL an asshole?
SAP may be expecting a + rather than ||
SELECT
T_1.*
FROM
T_1,
T_2
WHERE
T_2.REF_POSID LIKE T_1.POS_NR + '%';
-or-
SELECT
T_1.*
FROM
T_1,
T_2
WHERE
T_2.REF_POSID LIKE T_1.POS_NR + '*';
It is my belief that Sybrand's comments are not always understood as
he intended.
Charles Hooper
IT Manager/Oracle DBA
K&M Machine-Fabricating, Inc.
Received on Tue Jun 12 2007 - 07:11:45 CDT
![]() |
![]() |