Link to home
Start Free TrialLog in
Avatar of JMO9966
JMO9966

asked on

MS Access query assistance needed

Hello,
 
I'm trying to write an MS Access query that will search a 3 character text field in a Table and return any rows that have a one (1) as the third character.  This field store three boolean indicators as a String without any seperators.

examples:

Char 1 = Default Main
Char 2 = Default Ship
Char 3 = Default Billing

This is for a tables that holds all Addresses listed for a Customer or Vendor.  There can be only one record with Char 1 in this field set to 1 (true) and same for Ship and Billing, only one record would have Char 2 as 1 (true) for this Customer or Vendor ID.

I want my query to link to this table by Customer ID and then return the row that has Char 1 as a 1(true).

examle values in this field would be:

111
011
001
010
110
etc...

Thanks,
JMO9966
Avatar of Clif
Clif
Flag of United States of America image

SELECT myField from mytable where mid(myfield, 3, 1) = '1'
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial