3rd position of a field is " "

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to delete accounts that the 3rd position from the left is a space.
 
To identify the records

WHERE SomeField LIKE "?? *"

or

WHERE Mid(SomeField,3,1) = " "

Field: Some Field
Criteria: LIKE "?? *"


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
DELETE tblCHARI.*
FROM tblCHARI
WHERE InStr(1,[Accounts]," ") = 3;

I'm assuming that you mean the entire record.
 
Run a select query to verify what you want to delete first. Maybe backup the
database just in case.
Use this for criteria --
Like "?? *"
The two question marks say that there are two characters preceding the space.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top