Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Substitute for SUBSTR

Re: Substitute for SUBSTR

From: Charles Hooper <hooperc2000_at_yahoo.com>
Date: Tue, 12 Jun 2007 05:11:45 -0700
Message-ID: <1181650305.055370.85880@r19g2000prf.googlegroups.com>


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

Original text of this message

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