Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with update query 2

Status
Not open for further replies.

JCAA

MIS
Jun 22, 2003
65
US
How would I make an update to the following:

I have a file and some of the part numbers have an –P in the end so instead of for example 1234 it is1234-P. what would my criteria in an update query be to delete all “-P’s”
Thanks!
 
In the Where statement:

WHERE (Right([PartNumber],2)="-P")

is what you would use to delete only partnumbers with a -P in the number
 
UPDATE TABLENAME SET FIELDNAME = Left([PartNumber], 4) WHERE (Right([PartNumber],2)="-P")

Will change the field value from 1234-P to 1234


Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top