View Full Version : Update Query based on length of value in field


barlee
07-12-2007, 09:02 AM
I want to create an query that will update a field value for records where the length of the field value is less than a given number (if LEN of UniqueID is less than 6 for example), but I can't figure out how to write a SELECT query, much less an UPDATE query for this condition....can someone help me, please?

freakazeud
07-12-2007, 04:53 PM
Hi,
just create a new expression which returns the length of the value of your field and set criteria on it e.g.:

UPDATE YourTable SET YourTable.YourField = "Something"
WHERE (((Len([YourID]))<6));

HTH
Good luck