How do I make a table that will truncate my data field?

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

Guest

I have a field "0002222 Catheter". I need to create a table that just pulls
out the 2222. I thought I could truncate somehow?
 
If the numbers are always first, create a query, and type this into the
field row:
Val(Nz([F1], "0"))

After verifying that this give the right results, you can turn it into a
Make Table query, along with the other fields you want. Make Table is on the
Query menu, in query design view.
 
Allen,
1) Do I put in the criteria or field?
2) It is asking for a value for F1.

I am wondering why I can't use Left[fieldname},3) to get to the 2222
portion. Then use a right funtion to get rid of the words?

I do not understand how your expression works, so trying to keep simple.
Thanks for the feedback!
D

Allen Browne said:
If the numbers are always first, create a query, and type this into the
field row:
Val(Nz([F1], "0"))

After verifying that this give the right results, you can turn it into a
Make Table query, along with the other fields you want. Make Table is on the
Query menu, in query design view.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

den said:
I have a field "0002222 Catheter". I need to create a table that just pulls
out the 2222. I thought I could truncate somehow?
 
Sorry: F1 was an example for your field name.
Substituate your field name.

Left([F1],3) would just give you the 3 zero's, I think?

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

den said:
Allen,
1) Do I put in the criteria or field?
2) It is asking for a value for F1.

I am wondering why I can't use Left[fieldname},3) to get to the 2222
portion. Then use a right funtion to get rid of the words?

I do not understand how your expression works, so trying to keep simple.
Thanks for the feedback!
D

Allen Browne said:
If the numbers are always first, create a query, and type this into the
field row:
Val(Nz([F1], "0"))

After verifying that this give the right results, you can turn it into a
Make Table query, along with the other fields you want. Make Table is on
the
Query menu, in query design view.

den said:
I have a field "0002222 Catheter". I need to create a table that just
pulls
out the 2222. I thought I could truncate somehow?
 

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