I have a table with a User field. It is LastName,FirstName. I have another table LastName, FirstName with a space after the comma. I need to run a join query on the User fields. How do I insert a space after the comma on my first table.
1. Why exactly do you have 2 different table with user names?
2. By having a field with full user name, you are breaking the very first rule of data normalization. "All Fields Must Be Atomic".
Maybe, if you're willing, we could help you get this sorted out.
Also, I'll bet this is why you are having a difficult time getting an answer.... because it is being done incorrectly.
Pre-Post-Script ----- I only know this because I did this too!
If you want help to fix this, just ask. If not, give more detail on how the data is being copied from one table to the other.
I agree but this is not my table, it is what I have to work with. Here is what I did; I separated out the LastName, and FirstName into separate fields and then I concatenated these 2 fields into a 3rd field in a table with the space between the First and Last names. A little confusing but here is the code:
SELECT MyTableScoreAvgNameTrim.UserName, MyTableScoreAvgNameTrim.[%], Left([UserName],InStr(1,[UserName],",")) AS last, Mid([UserName],InStr(1,[UserName],",")+1) AS First, [last] & " " & [first] AS Expr1 INTO MyTableAvgWithNameSpace
FROM MyTableScoreAvgNameTrim;
Again, I had to work with an existing table structure.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.