ignore first number

G

Guest

Hi everyone,

I have a table with an ID field composed by 5 numbers

61234
61254
71274

I need a query that will show onli the last 4 numbers:

1234
1254
1274

Can anyone help me, please??
--
Thanks,

Sorry if my english isn''t correct, but I''m from Potugal ;)

Emanuel Violante Galeano
 
G

Guest

Try as a new field in the query

Mid([FieldName],2)

So it won't include the first digit
 
A

Andrew

Hi everyone,

I have a table with an ID field composed by 5 numbers

61234
61254
71274

I need a query that will show onli the last 4 numbers:

1234
1254
1274

Can anyone help me, please??
--
Thanks,

Sorry if my english isn''t correct, but I''m from Potugal ;)

Emanuel Violante Galeano

Hi

Try this in the field name row of a new field in your query

NewFieldName:right(ID,4)

Alternatively, if there may be more than five digits, but you always
want to ignore the first digit, use

NewFieldName: right(ID, len(ID)-1)

Good luck!
Andrew
 
G

Guest

thanks verry much, to both ;)

It worked just fine!!!

=D

--
Thanks,

Sorry if my english isn''t correct, but I''m from Potugal ;)

Emanuel Violante Galeano


"Emanuel Violante" escreveu:
 

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