I have a table which stores data for AD users in one of columns like abc\sam, abc\bill, xyz\Ramos etc.. (domain\username)
I am trying to use select query to trim anything after\ and just give me domain with their location. That is, after trimming abc for example returns as NorthEast, xyz returns SouthPacfic etc.
Please suggest how can I write a SQL query for this