Hello there, thank you for your help in advance.
I've got table containing student data. The data is exported by a program called SIMS and i've written a script to import the text file.
The users' usernames are created by concatenating their DOB and initial of first and last name for ease of use by the students. Obviously this is not a unique method and some students' usernames do clash, whereby the script adds an addittional integer to the end of the conflicting username.
It's all fine up to this point...
Schools are going to want to see a list of usernames which clash and are not normal. I need to write a query which selects usernames from the table whose 8 left characters are the same as any other usernames eight left characters.
Obviously;
select uname from students where left(uname,8)=left(uname,8)
will return all records as records will be matched to themselves. Is there a way to only return the record if it matches two or more other records?
Thank you in advanve,
llapgoch