Re: Moving character fields

  • Thread starter Emad_S_Banoub74
  • Start date

Emad_S_Banoub74

Active Member
Re: Moving character fields

Hello List,
It may be a silly question! but I need to assign a 10 char. variable from
a 12 char. cost center.
I always gets the first left 10!!!!!!!!!
I know it's simple but my brain is blocked for now...
Thanks
EB
MWH
Xe U6 SP20 - A7.3 CU12/X3 coexistence
 
Re: Moving character fields

Hi Emad

Since MCU is RIGHT alligned with 12 characters, a copy into a 10 character field will always result in 'chopping' of the last two characters. The two easiest methods are:
a) Ltrim MCU to trim leading spaces
b) Substr(MCU,2,10) to cut the first two spaces

Rgds,
 
Re: Moving character fields

Sef,

>>"b) Substr(MCU,2,10) to cut the first two spaces"

...exactly:

b) Substr(MCU,2,10) to cut the last 10 character, more exactly, the 10 characters from the 2nd position (Note: position is 0 based), independently which is the first two character (space or any)
;-)

Regards,

Zoltán
 
Re: Moving character fields

thanks all! I know it was simple!



Zoltan_Gyimesi
<zoltan.gyimesi@s To: [email protected]
ynergon.hu> cc:
Sent by: Subject: Re: Moving character fields
owner-jdeowdev@jd
elist.com


12/04/02 08:58 AM
Please respond to
jdeowdev






Sef,


...exactly:

b) Substr(MCU,2,10) to cut the last 10 character, more exactly, the 10
characters from the 2nd position (Note: position is 0 based), independently
which is the first two character (space or any)
;-)

Regards,

Zoltán
XE UPDATE 2 SP15.1, Intel NT4, SQL 2000
(was/is working with B7321, B7331, B7332 too)
To view this thread, go to:
http://www.jdelist.com/ubb/showthreaded.php?Cat=&Board=OWDEV&Number=46270
+ - - - - - - - - - - - - - - - - - - - - - - - -+
This is the JDEList One World® / XE Developers mailing list/forum.
Archives and information on how to SUBSCRIBE, and
UNSUBSCRIBE can be found on the JDEList Forum at
http://www.JDEList.com

JDEList is not affiliated with JDEdwards®

+ - - - - - - - - - - - - - - - - - - - - - - - -+
 
Back
Top Bottom