[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: SQR version 2.5.7 on DEC AXP Platform



David,

The code I sent worked just fine in our previous installation.  The order of 
the characters in the 'y' string makes no difference,  Winess:

SQL>
Select rtrim('12345','543') from dual;

RT
--
12

SQL>
Select rtrim('12345','345') from dual;

RT
--
12

The manual says 'until the characters is not in set y'.  It aught to (and used 
to ) work just fine.  In SQLPLUS:

SQL> select rtrim('123453984756839845','0123456789') from dual;

R
-


Ed Forman



Date: Sat, 04 Mar 1995 01:51:36 -0700
From: KINGD@randb.abbott.com
Subject: Re: SQR version 2.5.7 on DEC AXP Platform

Ed,

   RTRIM in SQR V2.5.7 works the way RTRIM works in SQL.  Try these 
selects in SQL.

Select ltrim('12345','123') from dual;

  RETURN VALUE: 45

Select rtrim('12345','123') from dual;
  
  RETURN VALUE: 12345
 
No try this:  Select rtrim('12345','543') from dual;

  RETURN VALUE: 12

  Since you are trying to RTRIM(X,Y) it is reading X from right to left and
reading Y from left to right searching for matches until Y is no longer 
found in X.  Thusly your RTRIM('123456789','123456789') is not 
working 9 in X does not match 1 in Y and so on.  For this to work you need 
RTRIM('123456789','987654321').  Hope this helped a little.

                               David
----------------------------------------------------------------------------
  KINGD@RANDD.ABBOTT.COM                             David R. King    
  Abbott Laboratories Inc.                           Research Computing

  Time is a train that changes future to past....
-----------------------------------------------------------------------------