William Hindman
wdhindman at bellsouth.net
Tue Apr 15 23:04:58 CDT 2003
...sorry ...I have a harelip ...only speak rabbit :))) William Hindman "All it takes for evil to prevail is for good men to do nothing." Edmund Burke ----- Original Message ----- From: "Drew Wutka" <DWUTKA at marlow.com> To: <accessd at databaseadvisors.com> Sent: Tuesday, April 15, 2003 8:37 PM Subject: RE: [AccessD] Search for string with wildcard characters > Because the string he is 'looking' for in that last 'string' starts at > position 9. Now William....how long have you been writing code? <evilgrin> > > Drew > > -----Original Message----- > From: William Hindman [mailto:wdhindman at bellsouth.net] > Sent: Monday, April 14, 2003 11:51 AM > To: accessd at databaseadvisors.com > Subject: Re: [AccessD] Search for string with wildcard characters > > > "and return a 9" > > ...that's about as close to mud as you can get ...how did you arrive at the > "9"? :( > > William Hindman > "All it takes for evil to prevail is for good men to do nothing." Edmund > Burke > > > ----- Original Message ----- > From: <rusty.hammond at cpiqpc.com> > To: <accessd at databaseadvisors.com> > Sent: Monday, April 14, 2003 12:00 PM > 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 > > > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > _______________________________________________ > > AccessD mailing list > > AccessD at databaseadvisors.com > > http://databaseadvisors.com/mailman/listinfo/accessd > > Website: http://www.databaseadvisors.com > > > > > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com > _______________________________________________ > AccessD mailing list > AccessD at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/accessd > Website: http://www.databaseadvisors.com >