if you're using SQL Program, i think you mean "MySQL" then you can use the function "CharIndex"
the statment should be something like this
"Select Substring(ColumnName,0,CharIndex('.',ColumnName)) as NewUserID From TableName"
0 is Start Index
CharIndex will Return the index number for the '.' and it will be the same the supposed length for the string without the .abc