return a specific part of a field

M

MBC

I have a field T008 that is data type memo. It can contain up to 40
positions. I need to extract just position number 33 of this field and
test whether it contains a 1 or some other number or letter.

These are some examples of what the field looks like.
041220 000 0 eng d 940111s1993
nju058 vlspa d
940808s1994 dcunnn r j dut d
781012s1978 flu b 000 1 spa

Only the last example has a "1" in position 33 (right before spa).

How can I do this in a query?
 
R

Rick B

First, why are you using a memo field if it only holds 40 positions?

Simply add a new column to your query....

Position33: Mid([YourFieldNameHere],33,1)

Then put criteria under it like...

"1"

or

not "1"



--
Rick B



I have a field T008 that is data type memo. It can contain up to 40
positions. I need to extract just position number 33 of this field and
test whether it contains a 1 or some other number or letter.

These are some examples of what the field looks like.
041220 000 0 eng d 940111s1993
nju058 vlspa d
940808s1994 dcunnn r j dut d
781012s1978 flu b 000 1 spa

Only the last example has a "1" in position 33 (right before spa).

How can I do this in a query?
 
J

JohnFol

Or better still, put the contents of the memo field into a new table as it's
obviously relating to rows / columns of data
 

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

Top