Re: [U2] Using 'MATCH'

2011-11-04 Thread Mecki Foerthmann
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

Re: [U2] Using 'MATCH'

2011-11-04 Thread Charles Stevenson
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

Re: [U2] Using 'MATCH'

2011-11-01 Thread Charles Stevenson
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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Greg Coelho
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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Wjhonson
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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Martin Braid
...@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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Woodward, Bob
] 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

Re: [U2] Using 'MATCH'

2011-10-31 Thread George Gallen
...@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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Wjhonson
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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Wjhonson
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

Re: [U2] Using 'MATCH'

2011-10-31 Thread George Gallen
- 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

Re: [U2] Using 'MATCH'

2011-10-31 Thread George Smith
: 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

Re: [U2] Using 'MATCH'

2011-10-31 Thread George Smith
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:',',

Re: [U2] Using 'MATCH'

2011-10-31 Thread Greg Coelho
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

Re: [U2] Using 'MATCH'

2011-10-31 Thread George Gallen
-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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Wjhonson
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

Re: [U2] Using 'MATCH'

2011-10-31 Thread George Gallen
- 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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Greg Coelho
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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Greg Coelho
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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Wjhonson
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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Greg Coelho
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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Mecki Foerthmann
, 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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Greg Coelho
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

Re: [U2] Using 'MATCH'

2011-10-31 Thread Wols Lists
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