Wild Card a Field in a Table

N

Neil

I have a table of stores that have processed some templates of returns. The
templates have the store number followed by numerous warehous locations. So,
where the store number is 4031 and warehous location is P1xyz the template
number would look like "4031P1xyz". What I want to do is to query the
template for specific store numbers without regard to location. The P1xyz is
not static and can change for new templates and be removed for old ones so I
can not simply add all the current location to a table and combine the store
& location.

I just want to query the stores based on a table of stores as if there was a
wildcard at the end of store number.

Any ideas?

Thanks!
 
G

Golfinray

To get only the store number, you could use (in a query field) Store
Number:left([store],4)
 
N

Neil

Oh yeah, dang where is my head this morning... Thanks for the tip!

Golfinray said:
To get only the store number, you could use (in a query field) Store
Number:left([store],4)

Neil said:
I have a table of stores that have processed some templates of returns. The
templates have the store number followed by numerous warehous locations. So,
where the store number is 4031 and warehous location is P1xyz the template
number would look like "4031P1xyz". What I want to do is to query the
template for specific store numbers without regard to location. The P1xyz is
not static and can change for new templates and be removed for old ones so I
can not simply add all the current location to a table and combine the store
& location.

I just want to query the stores based on a table of stores as if there was a
wildcard at the end of store number.

Any ideas?

Thanks!
 
D

Dale Fye

Or you could use a criteria that looks like:

WHERE INSTR([TemplateNumber], "4031") = 1

or

WHERE [TemplateNumber] Like "4031*"


--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



Neil said:
Oh yeah, dang where is my head this morning... Thanks for the tip!

Golfinray said:
To get only the store number, you could use (in a query field) Store
Number:left([store],4)

Neil said:
I have a table of stores that have processed some templates of returns. The
templates have the store number followed by numerous warehous locations. So,
where the store number is 4031 and warehous location is P1xyz the template
number would look like "4031P1xyz". What I want to do is to query the
template for specific store numbers without regard to location. The P1xyz is
not static and can change for new templates and be removed for old ones so I
can not simply add all the current location to a table and combine the store
& location.

I just want to query the stores based on a table of stores as if there was a
wildcard at the end of store number.

Any ideas?

Thanks!
 
Top