I have an Access 2013 Database Table, dbo_GOV
THE GOAL
I want to take the USSenators field, which contains data like (below) and split it into USSenator1 and USSenator2 fields, respectively:
John Smith;Sarah Levens
Bill Burr;Kevin Nill
George Thomson;Tracy Johnson
THE PROBLEM
I've tried a few different Access SQL queries... both (below) when executed, give the error message
Invalid use of '.', '!', or '()'. in query expression 'Split(USSenators & ";", ';')(0'.
I have verified that there are 0 records, where USSenators is blank. Every row has 2 people listed, separated by a semicolon.
SQL QUERIES
UPDATE dbo_GOV
SET
USSenator1 = Split(USSenators & ";",';')(0),
USSenator2 = Split(USSenators & ";",';')(1);
UPDATE dbo_GOV
SET
USSenator1 = Split(USSenators,';')(0),
USSenator2 = Split(USSenators,';')(1);
I've tried referencing the Office documentation for Split: here