On Fri, 30 Jan 2004 05:18:05 -0800,
I think you may need to run this as (probably three) update queries
run separately, since the expression which will edit a string
containing a comma will cause an error if there is no comma.
If it comes to a comma replace the field with the first
string
This is easy by itself. Use a criterion of
LIKE "*,*"
to select only cities where ther is a comma.
The InStr() function returns an integer, the position of its second
string argument within the first argument - i.e.
InStr("abcdef", "c")
returns 3 because c is the third character. So you can use InStr to
find the position of the comma. The function Left(string, n) will
return the leftmost n bytes of string. So:
Left([City], InStr([City], ",") - 1)
will find the first comma in City - let's say that's the 10th byte;
subtract 1 to backspace over the comma, and return the leftmost 9
bytes.
If it comes to a blank and the next space is blank replace
the field with the first string
Same thing: exept use " " (a string constant containing exactly two
blanks) in place of ",".
If the field is empty replace with NULL
These are already null; you don't need to do anything with these
records at all.
If the string comes to a blank and the next space is a
character replace with string 1 and 2.
And that I do not understand. What's an example?