[AccessD] Search for string with wildcard characters

Wortz, Charles CWortz at tea.state.tx.us
Mon Apr 14 11:12:19 CDT 2003


Rusty,

EDI or XML is the way to go for passing files between different
organizations.  You should be billing the RR for your time if they
refuse to adopt either of those standards instead of your client.

Charles Wortz
Software Development Division
Texas Education Agency
1701 N. Congress Ave
Austin, TX 78701-1494
512-463-9493
CWortz at tea.state.tx.us



-----Original Message-----
From: rusty.hammond at cpiqpc.com [mailto:rusty.hammond at cpiqpc.com] 
Sent: Monday 2003 Apr 14 11:00
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Search for string with wildcard characters

I think if there was a way to incorporate the Like operator with the
InStr function then my problem would be solved.  

Let me explain what I'm doing and maybe someone will have suggestion for
a better way of doing it.

My client sends a text file of invoices to a Railroad (RR) company.
This RR requires a specific file format for their billing system to
import the invoices.  My client has tried working with their accounting
software people to get the format they need but they say they have done
what they need to do so if it requires more coding they will do at a fee
of $250 per hour and quoted 25 hours (great money if you can get it).  

Anyway, I'm taking the text file the accounting software creates which
is close to what is needed, and making the few more changes to it to
make it compatible with the RR company.  So far, I've discoved that by
searching the file for certain strings, I can replace that string with
something else. It's been fairly simple up to this point since the
strings I'm searching for have all been static.  I'm storing the strings
to search for and replace with in a table so if something changes they
just adjust the strings in the table and away we go.

Now we have a change where the portion of the file I need to change
includes a date which changes with each new file.  Now, I could have the
client change the date in the searchfor string each time they run the
program for a new file but it would be really nice if I could have a
function search for "N1~GA~????????" (where the ?'s represent a date in
yyyymmdd format)in this string "REF~03~!N1~GA~20020414" and return a 9.

Clear as mud?

Rusty

-----Original Message-----
From: Mike and Doris Manning [mailto:mikedorism at ntelos.net]
Sent: Monday, April 14, 2003 10:20 AM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Search for string with wildcard characters


How about InStr function?

Doris Manning
Database Administrator
Hargrove Inc.
www.hargroveinc.com


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
rusty.hammond at cpiqpc.com
Sent: Monday, April 14, 2003 10:57 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Search for string with wildcard characters


Does anyone have any code that will search a string variable for a
string that includes wildcard characters and returns the location?

ie
strVariable="This is a test"
search strVariable for "te??" returns 11


Rusty


More information about the AccessD mailing list