K
kkulakow via AccessMonster.com
Hello, I am having a heck of a time figuring this out and hope some of the
experts here can help me.
I have a table (FPTABLE) containing shipment data where the 'Reference' field
is used to store the reference numbers of the shipment. There can be one or
more reference numbers (a mix of letters and numbers) entered in this field,
usually separated by a space, a comma, or by nothing. There are no rules or
structure to how this information is entered. (I wish there were but we have
no control over it as the data is sent from another company).
I am trying to match the numbers in the 'Reference' field against the
'OrderNum' field in the ORDERSTABLE. My thought is to pull out only the
numbers from the 'Reference' field and place them in one or more columns. As
I can not find any standard separator, my thought is to pull only the numbers,
separating each contiguous number sequence with a comma. I can then parse
this column using the comma delimiter into two or more columns and match
these against the 'OrderNum' field which does have a structure and contains
only one order number per record. This is the only logical way I can see to
do this but please feel free to suggest better ways.
The following are some examples to show what I am trying to achieve.
FPTABLE.Reference Result
PO# NK10135352 SO#421861 10135352, 421861
PO# 900070887 & 90007093 900070887, 90007093
ln10141955/HX240557901 10141955, 240557901
NV:83742 PO:CI10142013 83742, 10142013
Can someone help me with the required code or better yet, a function I can
use in a query?
Thanks,
Kerry
experts here can help me.
I have a table (FPTABLE) containing shipment data where the 'Reference' field
is used to store the reference numbers of the shipment. There can be one or
more reference numbers (a mix of letters and numbers) entered in this field,
usually separated by a space, a comma, or by nothing. There are no rules or
structure to how this information is entered. (I wish there were but we have
no control over it as the data is sent from another company).
I am trying to match the numbers in the 'Reference' field against the
'OrderNum' field in the ORDERSTABLE. My thought is to pull out only the
numbers from the 'Reference' field and place them in one or more columns. As
I can not find any standard separator, my thought is to pull only the numbers,
separating each contiguous number sequence with a comma. I can then parse
this column using the comma delimiter into two or more columns and match
these against the 'OrderNum' field which does have a structure and contains
only one order number per record. This is the only logical way I can see to
do this but please feel free to suggest better ways.
The following are some examples to show what I am trying to achieve.
FPTABLE.Reference Result
PO# NK10135352 SO#421861 10135352, 421861
PO# 900070887 & 90007093 900070887, 90007093
ln10141955/HX240557901 10141955, 240557901
NV:83742 PO:CI10142013 83742, 10142013
Can someone help me with the required code or better yet, a function I can
use in a query?
Thanks,
Kerry