Hi. I have a table with firstName & lastName. I need to run an sql to create a userName. I want the username to be the first initial of firstName and first seven letters of lastName.
I have this so far:
but am running into a small problem.
Some of the last names are shorter than 7 characters which is ok, but these "shorter names" have trailing spaces and characters such as " / " and other words following. I need to be able to trim anything to the right of these characters and am stuck here.
I have this so far:
Code:
username: LCase(Left([firstName],1) & "" & (Left([lastname],7)))
Some of the last names are shorter than 7 characters which is ok, but these "shorter names" have trailing spaces and characters such as " / " and other words following. I need to be able to trim anything to the right of these characters and am stuck here.
Comment