Appending

J

Justin

One a table, i have this column that has users lastname,firstname
I need to have it append to another table but break the last name and first
name
the way the name appears on the first table is Lastname,Firstname. Please help
 
B

Brendan Reynolds

Here's a quote from something I posted the last time this question was asked
....

UPDATE tblTest SET tblTest.firstname =
Left$([fullname],InStr(1,[fullname],",")-1), tblTest.lastname =
Mid$([fullname],InStr(1,[fullname],",")+1);

You're sure there's no space after that comma? You'll need to modify the
above slightly if there is - change the "+1" to "+2".
 
O

Ofer

Try this

INSERT INTO Table2 ( lastname,firstname)
SELECT left(Table1.Name,instr(Table1.Name,",")-1),
mid(Table1.Name,instr(Table1.Name,",")+1)
FROM Table1

Assuming that the "," seperating between the first and last name
 
Top