Mechi, I am creating an extract for export to a third party vendor. This requires that I convert a multi-valued field to a single (comma delimited) value. The thought was instead of converting from comma to @VM and then back to comma that we might save the processor a bit of work by keeping is simple and just using COUNT against the comma delimited value. Initially I thought that I might go upstream and use LOCATE while we were still dealing with a multi-valued field, there are subroutines in place that are considering other criteria...
Thanks, Greg From: Mecki Foerthmann <[email protected]> To: [email protected] Date: 10/31/2011 05:54 PM Subject: Re: [U2] Using 'MATCH' Sent by: [email protected] 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 and convert the @VM back to commas? BTW if the first string is HELL or it is the first entry then counting ,HELL, won't find it either. KISS! Mecki On 31/10/2011 20:41, George Gallen wrote: > Be careful using a straight count, > > Because "HELL" will be found in in the word "HELLO" for instance, and would not be added > Make sure you surround your search criteria with the delimiters being used, as noted in one of the replies. > > So, ,HELL, would not be found if ,HELLO, were in the list. > > George > > -----Original Message----- > From: [email protected] [ mailto:[email protected]] 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 confused > with COUNT thinking that it could navigate a delimiter... In this > situation I'm thinking that just using COUNT would be the best solution. I > do appreciate the diversity of the solutions presented. > > Thanks! > > Greg > > > > From: "Woodward, Bob"<[email protected]> > To: "U2 Users List"<[email protected]> > Date: 10/31/2011 01:55 PM > Subject: Re: [U2] Using 'MATCH' > Sent by: [email protected] > > > > You might also be able to use COUNT. > > IF COUNT(X.STRING,X.CODE) = 0 THEN X.STRING := X.CODE > > Not knowing what your potential codes are, though, they may or may not > fit your needs. > > _______________________________________________ > 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 _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
