EREPLACE function?
SYNTAX
EREPLACE (expression, substring, replacement
[,occurrence
[,begin]]
)
DESCRIPTION
Use the EREPLACE function to replace substring in
expression
with another substring. If you do not specify occurrence,
each
occurrence of substring is
replaced.
occurrence specifies the number of occurrences of substring
to
replace. To replace all occurrences, specify occurrence as
a
number less than 1.
Glorfield, Gordon wrote:
What about SWAP?
SWAP str.expr1 WITH str.expr2 IN var
The UniBasic SWAP command replaces all occurrences of one substring with a
second substring. The search string does not have to be the same length as the
replacement string. SWAP supports mulitbyte languages.
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Greg Coelho
Sent: Wednesday, June 08, 2011 11:47 AM
To: [email protected]
Subject: Re: [U2] Selecting a List
Hi All,
Again, I need a little help.
The following PROCEDURE LINE works just fine. In this case I'm just
inserting the variable V.CALENDAR.YEAR to complete my file suite and I am
going after 2 alphanumeric records ('P2021422' 'P2083158').
PROCEDURE LINE "SELECT GLA.":V.CALENDAR.YEAR:" WITH GLA.REF.NO =
'P2021422' 'P2083158'"
The problem arises when I attempt to select from a LIST (below)
PROCEDURE LINE "SELECT GLA.":V.CALENDAR.YEAR:" WITH GLA.REF.NO = ":
VL.JS.LIST.VAR1
Of course the system does not like the Value Marker so I need to get rid
of it...
VL.JS.LIST.VAR1 = "'":CONVERT (@VM,"' '",VL.JS.LIST.VAR1):"'"
The hope here is to replace @VM with ' ' and then place the ' at each
end... but CONVERT will only switch one for one - one @VM for a single
single quote (') which results in a quote mismatch.
Any suggestions?
Greg
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
--
------------------------------------------------------------------------
Jeff Schasny - Denver, Co, USA
jschasny at gmail dot com
------------------------------------------------------------------------
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users