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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query on partial field

Status
Not open for further replies.

PB90

Technical User
Jul 11, 2005
65
US
I would like to create a query based on the 3rd & 4th characters in a field. The total field is 8 characters.

ex. find all records where those characters are "FR"

field name is trkNum.

Any ideas?
 
How about:-

SELECT * FROM tblName WHERE Mid([trkNum], 3, 2) = 'FR'


'ope-that-'elps.




G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Another way:
WHERE trkNum Like '??FR*'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top