Well, you still won't find the first occurrence with INDEX() since it
hasn't got a comma in front.
Using the right tool (in this case LOCATE) for the job always helps!
On 01/11/2011 15:05, Charles Stevenson wrote:
What Wol George Smith said.
MATCH's raison d'etre is _PATTERN_ matching.
That
Both George's my examples addressed the leading comma problem.
But if that wasn't clear, that's a warning sign that the technique might
be not-so-maintainable!
LOCATE does seem more natural, more maintainable.
(MATCH is right out.)
I've always been surprised by how fast INDEX is.
When I try
What Wol George Smith said.
MATCH's raison d'etre is _PATTERN_ matching.
That means:
(a) MATCH is relatively expensive to use for comparing simple literals.
(b) For MATCH, you need to enclose the pattern's literals in embedded
quotes to ensure that it is not interpreted as a pattern.
Per
Hey Guys,
I am concatenating an alpha code into a string providing that the code
does not already exist (in the string). If my existing string = X.STRING
and my code = X.CODE should the following work?
IF X.STRING MATCH X.CODE THEN
END ELSE
X.STRING = X.STRING:',':X.CODE
END
Thanks!
Greg
Does Matches recognize comma as a delimiter? I don't think it does.
IF NOT(X.STRING) MATCH X.CODE THEN X.STRING1,-1 = X.CODE
-Original Message-
From: Greg Coelho coe...@american.edu
To: u2-users u2-users@listserver.u2ug.org
Sent: Mon, Oct 31, 2011 10:37 am
Subject: Re: [U2] Using
...@listserver.u2ug.org] On Behalf Of Greg Coelho
Sent: 31 October 2011 17:38
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Using 'MATCH'
Hey Guys,
I am concatenating an alpha code into a string providing that the code
does not already exist (in the string). If my existing string =
X.STRING
] On Behalf Of Martin Braid
Sent: Monday, October 31, 2011 10:44 AM
To: U2 Users List
Subject: Re: [U2] Using 'MATCH'
Hi Greg, I would convert your string to a VM array, use the LOCATE
syntax to add it if relevant and then convert back to a string. Martin
(I am not going to worry why you aren't just
...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Monday, October 31, 2011 1:43 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Using 'MATCH'
Does Matches recognize comma as a delimiter? I don't think it does.
IF NOT(X.STRING) MATCH X.CODE
11:47 am
Subject: Re: [U2] Using 'MATCH'
How about?
LOCATE X.CODE IN CHANGE(X.STRING,,,CHAR(254)) SETTING POS ELSE
.STRING=X.STRING:,:X.CODE
Or
LOCATE X.CODE IN CHANGE(X.STRING,,,CHAR(254))1 SETTING POS ELSE
.STRING=X.STRING:,:X.CODE
epending on which UV Flavor your running
-Original
Oops! Recte
CONVERT @VM TO , IN X.STRING
-Original Message-
From: Wjhonson wjhon...@aol.com
To: u2-users u2-users@listserver.u2ug.org
Sent: Mon, Oct 31, 2011 11:50 am
Subject: Re: [U2] Using 'MATCH'
f there is a need to extrude the result comma-delimited then
IF NOT(X.STRING
-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Monday, October 31, 2011 2:50 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Using 'MATCH'
If there is a need to extrude the result comma-delimited
: Monday, October 31, 2011 10:44 AM
To: U2 Users List
Subject: Re: [U2] Using 'MATCH'
Hi Greg, I would convert your string to a VM array, use the LOCATE
syntax to add it if relevant and then convert back to a string. Martin
(I am not going to worry why you aren't just using an array
Hit the wrong key and sent this incomplete. Finished below
On Mon, Oct 31, 2011 at 12:15 PM, George Smith grsassocia...@gmail.comwrote:
If you are trying to look for an arbitrary delimited string, I think the
safest thing to do is something like
IF INDEX(',':X.STRING:',',
From: Woodward, Bob bob_woodw...@k2sports.com
To: U2 Users List u2-users@listserver.u2ug.org
Date: 10/31/2011 01:55 PM
Subject:Re: [U2] Using 'MATCH'
Sent by:u2-users-boun...@listserver.u2ug.org
You might also be able to use COUNT.
IF COUNT(X.STRING,X.CODE) = 0
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Greg Coelho
Sent: Monday, October 31, 2011 4:15 PM
To: U2 Users List
Subject: Re: [U2] Using 'MATCH'
Guys,
Thanks for the great suggestions. I believe that I did get
Match *can* navigate a delimiter.
It navigates the multi-value delimiter @VM
That's the only one it can navigate, but why not use it if it's there ?
To me using Match makes the code clear.
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson
Sent: Monday, October 31, 2011 4:47 PM
To: u2-users@listserver.u2ug.org
Subject: Re: [U2] Using 'MATCH'
Match *can* navigate a delimiter.
It navigates the multi-value delimiter @VM
George,
Thanks! This is a good point. I will retain the ',' delimiter when I do
my COUNT.
Greg
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Date: 10/31/2011 04:45 PM
Subject:Re: [U2] Using 'MATCH'
Sent by:u2-users-boun
George,
Thanks for pointing this out. I'm running a test now... if it there are
any issues I'll switch to MATCH and @VM.
Greg
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Date: 10/31/2011 05:10 PM
Subject:Re: [U2] Using 'MATCH
Your syntax is backward George its not IF Y MATCH HELLO
its
IF HELLO MATCH Y
-Original Message-
From: George Gallen ggal...@wyanokegroup.com
To: U2 Users List u2-users@listserver.u2ug.org
Sent: Mon, Oct 31, 2011 2:10 pm
Subject: Re: [U2] Using 'MATCH'
Is it flavor dependent?
I
To: u2-users@listserver.u2ug.org
Date: 10/31/2011 05:20 PM
Subject:Re: [U2] Using 'MATCH'
Sent by:u2-users-boun...@listserver.u2ug.org
Your syntax is backward George its not IF Y MATCH HELLO
its
IF HELLO MATCH Y
-Original Message-
From: George Gallen ggal
, were in the list.
George
-Original Message-
From: u2-users-boun...@listserver.u2ug.org
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Greg Coelho
Sent: Monday, October 31, 2011 4:15 PM
To: U2 Users List
Subject: Re: [U2] Using 'MATCH'
Guys,
Thanks for the great suggestions
mec...@gmx.net
To: u2-users@listserver.u2ug.org
Date: 10/31/2011 05:54 PM
Subject:Re: [U2] Using 'MATCH'
Sent by:u2-users-boun...@listserver.u2ug.org
I don't get the problem.
Why would you want to do this in the first place?
Why not just convert the commas to @VM, use LOCATE
On 31/10/11 17:37, Greg Coelho wrote:
Hey Guys,
I am concatenating an alpha code into a string providing that the code
does not already exist (in the string). If my existing string = X.STRING
and my code = X.CODE should the following work?
IF X.STRING MATCH X.CODE THEN
END ELSE
24 matches
Mail list logo