Originally Posted by
June7
Go to SQL View of query builder and copy/paste the following SQL statement:
SELECT Tbl_UnitGroup.ID, Tbl_UnitGroup.Unit, Switch([Unit] In ("1","2","3","I","I Gr"),"I",[Unit] In ("4","5","6","II","II Gr"),"II",[Unit] In ("7","8","9","III","III Gr"),"III") AS Grp FROM Tbl_UnitGroup;
If you want to actually populate Group field, use:
UPDATE Tbl_UnitGroup SET Tbl_UnitGroup.[group] = Switch([Unit] In ("1","2","3","I","I Gr"),"I",[Unit] In ("4","5","6","II","II Gr"),"II",[Unit] In ("7","8","9","III","III Gr"),"III");
If you want to remove " GR" from [Unit] field, a simple Find/Replace can accomplish that. But do you really want to change the original data?