Re: Stored Procedures and clipping strings
Posted in 1997
Topics: Stored Procedures & SPL
Galt von Holten wrote: > > If you like to have this c="xy" > You have to do c=x clipped,y clipped > > Cerna Camones Rosa Mercedes wrote: > > > > i am trying to conncat two char-variables within a stored procedure. > > the operator || works fine, but: > > informix chars are space terminated and the conncatenation operator > > does not clip (skip all ending spaces) the strings. > > > > example: > > > > DEFINE a, b CHAR(10); > > DEFINE c CHAR(20); > > > > LET a = "x"; > > LET b = "y"; > > LET c = a || b; > > > > The variable c has now the values "x y ". > > I would like to have c = "xy ". > > > > HOW CAN I DO THIS ??? But not in a stored procedure. If you have version 7.x onwards then try the TRIM() function. Cheers, -- Mark. +------------------------------------------------------------------+ |Mark D. Stock - The West Solutions Group http://www.west.co.za | | The Informix FAQ is at http://www.iiug.org | |mailto:marks@west.co.za +-----------------------------------------+ |Tel: +27 11 803 2151 |If it doesn't work, force it! | |Fax: +27 11 803 2189 |If it breaks, it needed replacing anyway!| |Cell: +27 83 250 2325 |Well, that's how I code anyway! | +------------------------+-----------------------------------------+