remove quotes and contents inbetween quotes

R

Ray Mead

Help, I have a table where the first name has data like:

1. Mike "Butch"
2. Rose Marie "Mary"
3. William " bill"

How do I create an update query to remove the quotes and the stuff in
between them. Therefore the data should look like:

1. Mike
2. Rose Marie
3. William
 
B

Brendan Reynolds

If the text within quotes is always at the end, as in your example ...

UPDATE tblTest SET tblTest.TestText =
Trim(Left$([TestText],InStr(1,[TestText],Chr$(34))-1))
WHERE (((tblTest.TestText) Like "*" & Chr$(34) & "*"));

Replace 'tblTest' with the name of your table and 'TestText' with the name
of your first name field.

You'll need to modify this if any records have additional text, which you
want to keep, after the text within quotes.
 
Top