delete charachters on right?

  • Thread starter Thread starter KP
  • Start date Start date
K

KP

I have a field and I want to delete the 7 right most charachters. How do I
do that with a query. Thanks
 
Hi KP

make a new query

add the table

turn it into an UPDATE query
from the menu --> Query, Update

put this on the grid:

field --> [fieldname]
UpdateTo --> left([fieldname], Len([fieldname])-7)
criteria -->

field --> len(trim(nz(fieldname)))
UpdateTo -->
criteria --> > 7

from the menu -->
View, Datasheet

to see what the fields that you are going to change look like now

go back to design view

click the Run (!) button to do it

no need to save the query since you won't want to do this again...

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
Thanks for the detailed answer, worked perfect.

strive4peace said:
Hi KP

make a new query

add the table

turn it into an UPDATE query
from the menu --> Query, Update

put this on the grid:

field --> [fieldname]
UpdateTo --> left([fieldname], Len([fieldname])-7)
criteria -->

field --> len(trim(nz(fieldname)))
UpdateTo -->
criteria --> > 7

from the menu -->
View, Datasheet

to see what the fields that you are going to change look like now

go back to design view

click the Run (!) button to do it

no need to save the query since you won't want to do this again...

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


I have a field and I want to delete the 7 right most charachters. How do
I do that with a query. Thanks
 
you're welcome, KP ;) happy to help


Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


Thanks for the detailed answer, worked perfect.

strive4peace said:
Hi KP

make a new query

add the table

turn it into an UPDATE query
from the menu --> Query, Update

put this on the grid:

field --> [fieldname]
UpdateTo --> left([fieldname], Len([fieldname])-7)
criteria -->

field --> len(trim(nz(fieldname)))
UpdateTo -->
criteria --> > 7

from the menu -->
View, Datasheet

to see what the fields that you are going to change look like now

go back to design view

click the Run (!) button to do it

no need to save the query since you won't want to do this again...

Warm Regards,
Crystal
*
(: have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*


I have a field and I want to delete the 7 right most charachters. How do
I do that with a query. Thanks
 

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