title: Extract name and prename from email address?
body: <p>Question:
  I have a table with the columns ID, Name, Prename, Mail</p>
  
  <p>Mail contains the e-mail address of a person, for example john.doe@example.com</p>
  
  <p>Now I need to check whether Name='' or Prename=''
  and extract "John" from Mail and put it into Prename, and put "Doe" into column Name</p>
  
  <p>Can i do that with SQL, if yes how ?</p>
  
  <p>I use MS-SQL 2005</p>