MacroScope
Programmer
I am drawing insurance data into my DB by importing from Excel spreadsheets generated by each of several companies. The formatting of the policy numbers isn't identical to the way we have them recorded in our system, usually a different suffix. I've got a routine already in place that allows me to strip all the imported policy numbers of their suffixes. I'll give an example.
Policy number in our DB= MHP 0010636-01
Policy number coming from company via Excel= MHP 0010636-02
I've stripped the incoming policy number to read MHP 0010636, and now I want to match that to the MHP 0010636-01 that is in our database. I know I need to use a Like Operator with an asterisk. I would have no problem if it were a simple string. Like "MHP 0010636*" would return the result for the one policy. I want to match several thousand of them, so of course I'm using the field name rather than a literal string. Incoming numbers are [PolicyNum], while existing policy numbers are [PolicyNumber]. In a query in the PolicyNum field I don't know how to use the Like + * with a field name, to give me what amounts to Like [PolicyNum]*. Of course that syntax doesn't work.
Does anyone have a good syntax that will allow it to understand that I want it to match all of the field I'm interested in plus any additional characters.
Help would be appreciated.
Policy number in our DB= MHP 0010636-01
Policy number coming from company via Excel= MHP 0010636-02
I've stripped the incoming policy number to read MHP 0010636, and now I want to match that to the MHP 0010636-01 that is in our database. I know I need to use a Like Operator with an asterisk. I would have no problem if it were a simple string. Like "MHP 0010636*" would return the result for the one policy. I want to match several thousand of them, so of course I'm using the field name rather than a literal string. Incoming numbers are [PolicyNum], while existing policy numbers are [PolicyNumber]. In a query in the PolicyNum field I don't know how to use the Like + * with a field name, to give me what amounts to Like [PolicyNum]*. Of course that syntax doesn't work.
Does anyone have a good syntax that will allow it to understand that I want it to match all of the field I'm interested in plus any additional characters.
Help would be appreciated.