I need to update a field (field4) so it will get rid of the 0 after the dash. example1 0001-001 example2 222-001-02
The following query works with example1 only. Is the Iif statement the way to go here? I tried it a few different ways without any luck. The desired results are example1 0001-1
example2 222-1-2.
UPDATE [after query1] SET [after query1].FIELD4 = Left([FIELD4],InStr([FIELD4],"-")) & Right([FIELD4],Len([FIELD4])-(InStr([FIELD4],"-")+1))
WHERE ((([after query1].FIELD4) Like "*-0*"));
thanks for any advise
The following query works with example1 only. Is the Iif statement the way to go here? I tried it a few different ways without any luck. The desired results are example1 0001-1
example2 222-1-2.
UPDATE [after query1] SET [after query1].FIELD4 = Left([FIELD4],InStr([FIELD4],"-")) & Right([FIELD4],Len([FIELD4])-(InStr([FIELD4],"-")+1))
WHERE ((([after query1].FIELD4) Like "*-0*"));
thanks for any advise