In message <f07cf5651001211306h41458f3bkf3a2452d48f1d...@mail.gmail.com>, Richard Lewis <rbl...@gmail.com> writes
I would probably start by making an index on the Part Number, based on an
I-descriptor with an expression like this:

CONVERT(OCONV(OCONV(PartNumber,'MC/N'),'MC/A'),'',PartNumber)

Slightly longer, but I'd do it as follows

CONVERT( "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", "", UPCASE(PartNumber)); CONVERT( @1, "", UPCASE(PartNumber))

where PartNumber is a D-pointer to the raw data field that is the Part
Number.  This will strip out all the non-alphanumeric characters.

You could then easily access by Part Number no matter how many dashes, dots,
etc. were entered on either system, via the index.

Gets the "same" result as Richard (but uppercase), but it's generic - change the char string to whatever characters you want to keep, and everything else will disappear...

Oh - and even when you're doing the "exact match" select, it's probably a good idea to select on the index at the same time - it'll speed things up even further unless PartNumber is your @ID.

Cheers,
Wol
--
Anthony W. Youngman <pi...@thewolery.demon.co.uk>
'Yings, yow graley yin! Suz ae rikt dheu,' said the blue man, taking the
thimble. 'What *is* he?' said Magrat. 'They're gnomes,' said Nanny. The man
lowered the thimble. 'Pictsies!' Carpe Jugulum, Terry Pratchett 1998
Visit the MaVerick web-site - <http://www.maverick-dbms.org> Open Source Pick
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to