Hi,
Thanks for your time, but I'm trying to do that and replies saying that the expression is incorrect in mouse position. And mouse position stops in the first comma.
Campo       Expressão                          Título da Coluna      Comp  Dec 
TESTE2      SUBSTR(ciusmd,1,12)                                                
                                                                               
                                                                               
Obrigado,
Marco Silva
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of CRPence
Sent: terça-feira, 18 de Dezembro de 2007 17:17
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Left12
   Either CAST(LEFT(C15, 12) AS CHAR(12)) or use SUBSTR(C15, 1, 12) will 
effect a CHAR(12) result versus the VARCHAR(15) as seen [correctly, 
according to the LEFT scalar documentation].
http://publib.boulder.ibm.com/infocenter/systems/scope/i5os/index.jsp?topic=/db2/rbafzmstscale.htm
   >>-LEFT--(--expression--,-- /integer/ --)--------------------------><
   The LEFT function returns the leftmost integer characters of 
/expression/. <<SNIP>> The result of the function is a _varying-length_ 
string _with a length_ attribute that is the _same as_ the length 
attribute of _expression_ and a data type that depends on the data type 
of expression:
      Data type of expression    Data type of the Result
      CHAR or VARCHAR            VARCHAR
      <<SNIP>>
   The actual length of the result is /integer/
   <<SNIP>>
   The CCSID of the result is the same as that of expression.
    create table qtemp.c15 (c15 char (15) default '123456789012345')
    insert into  qtemp.c15 values(default)
    select c15,length(char(left(c15, 12))) from qtemp.c15
      ....+....1....+....2....+....3.
      C15                     LENGTH
      123456789012345             15
Regards, Chuck
As an Amazon Associate we earn from qualifying purchases.