title: Bug Issues - SQL Query needs to edit one row
body: <p>Ive got a bug which ive been looking into with my SQL code, when i try and update a user it decides to edit my whole database rather then one entry. The code worked previous until i put it into a single entry rather than individual ones.</p>
  
  <pre><code>IF exists (SELECT USERID FROM WUSERS WHERE USERID='XXXXX')
  begin
  
  -- Update it
  print 'updated'
  update WUSERS set FULLNAME= 'XXXXX' update WUSERS set PW= 'XXXXX' update WUSERS set telno= 'XXXXX' update WUSERS set email= 'XXXXX@email.com' update WUSERS set ROLEID= 'X' update WUSERS set dept= 'XXX' where userid= 'XXXXX'
  end
  
  else
  begin
  
  -- add it
  print 'added'
  insert into WUSERS (USERID,PW,FULLNAME,TELNO,EMAIL,ROLEID,DEPT) Values ('XXXXX','XXXXX','XXXXX','XXXXX','XXXXX@email.com','X','XXX')
  end
  </code></pre>
  
  <p>This is what ive currently got and im struggling to see whats gone wrong. Please ignore the X's this is just in placement of actual data.</p>
  
  <p>Cheers,</p>
  
  <p>Owen</p>