Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple query

Status
Not open for further replies.

bembden

IS-IT--Management
Mar 15, 2004
34
0
0
US
I am not a programmer, however I manage a medium database. It has an access front end connected to an sql back end.
I have been asked to export a work order table for specific systems for the analysis group. The asset record determines what systems to export. I need the abc systems only. In the criteria if I put "abc" I get no results. "abc*" gets me the abc system as well as the abcl/abcm/abch systems.
The abc system is the only set of systems with 3 alpha characters in the name. All other systems have 4 alpha characters.
Any help is appreciated.

Thanks
 
Is there a space after abc? Have you tried "abc "?



Brenda
 
Thanks for the reply Brenda

A space returns no records. The asset is identified as
abc100.00
abc101.00
abc102.00

With each asset having a number of records (abc100.00/.01/.02 etc)

Bernie
 
Maybe something like
Code:
'abc[0-9][0-9][0-9].'
which should give you 'abc' followed by three digits and a period.
 
Thanks Golom.


That does not seem to work either

Bernie
 
Try:

Like "ABC1*" Or Like "ABC2*" or Like "ABC3*" or Like "ABC4*"


Brenda
 
Code:
where asset is like "abc*" and IsNumeric(mid(asset,3,1))
 
sorry s/b

Code:
where asset is like "abc*" and IsNumeric(mid(asset,4,1))
 
Try:

Like "ABC1*" Or Like "ABC2*" or Like "ABC3*" or Like "ABC4*"


This will work if I ran 3 queries. The systems start at 100 and go to 300.
Is there a way to join them together?

Like abc 1 to 3?


Bernie
 
You can run them as one query:

Where Asset Like "ABC1*" Or Asset Like "ABC2* Or Asset Like "ABC3*"


Brenda
 
You can run them as one query:

Where Asset Like "ABC1*" Or Asset Like "ABC2* Or Asset Like "ABC3*"

Thanks byurow

I believe that will work.


Thanks everyone
 
Where Asset Like "ABC1*" Or Asset Like "ABC2* Or Asset Like "ABC3*"
A simpler way:
Code:
WHERE Asset Like 'ABC[123]*'

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top