Query to create field using first character of another field

  • Thread starter Thread starter MarkJH
  • Start date Start date
M

MarkJH

I have a table called RECORD LABELS which has a field called Label. I'
like a query which would create a new field (called Alphanumeric) jus
containing the first letter of the records in the field Label.

On top of this, when the record in the field Label starts with
number, I want the record in the corresponding Alphanumeric field to b
a zero, instead of the first character.

Is this possible and how would I implement it?

Thanks
 
Try the following in a query to create a calculated column (not a saved
field):
FirstLetter: IIf(Left([Label],1)<"A","0",Left([Label],1))
 

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