0
votes

When trying to run below script i am getting:

Data Type Mismatch error in criteria expression

UPDATE 14052017 SET [14052017].[Customer label] = [14052017].[Customer label]
WHERE ((([14052017].[Customer label])=Replace([14052017].[Customer label],"-","")));
1
UPDATE [14052017] - Alex K.
That query doesn't make sense. It just "updates" some labels to the values they already have. - Gustav

1 Answers

0
votes

You probably want this:

UPDATE [14052017] 
SET [Customer label] = Replace([Customer label],"-","")
WHERE [Customer label] LIKE "*-*"

Otherwise, as Gustav wrote, your UPDATE wouldn't change any data.

If all rows have the "-", you can omit the WHERE clause.