Sorry it took awhile to reply to everyone was out of town for the weekend. What I am doing is trying to create userids from a database which we are eventually going to use with gaggle.net and create userids and eventually passwords for students. I have had a few issues since I have been out of the SQL loop for a few years and things are slowly coming back to me.
What i did was create a userid taking graduation year(or the year they are suppose to) such as 2015 and pull out the last 2 digits, combine that with the last name, then the first initial of the first name as well as the middle initial. I also made sure that if the middle initial did not exist this would not cause issues as well as getting rid of hyphens or spaces in the last name.
So I created user names such as 15jonesdw, but I wanted to make sure each of these userids are unique since I am pulling from close to 20,000 students and they are all already in the database. I know there are probably much easier ways as many of you have mentioned, but I am trying to implement this as well as several other things all at once before school starts, which is only a few weeks away. Too bad this wasn't just for some school project I would already be completed and well on my way.
Thanks again for your help,
and any suggestions are great.