/**
  only update columns when values not empty
 */

UPDATE 
 `lead` 
 
SET 
	`site`  = CASE WHEN :site  <> '' THEN :site  ELSE `site`  END,  
	`form`  = CASE WHEN :form  <> '' THEN :form  ELSE `form`  END,  
	`state` = CASE WHEN :state <> '' THEN :state ELSE `state` END,  
	`shape` = CASE WHEN :shape <> '' THEN :shape ELSE `shape` END,  
	`id_agent` = CASE WHEN :agent <> '' THEN :agent ELSE `id_agent` END,  
	`id_user` = CASE WHEN :user <> '' THEN :user ELSE `id_user` END,  
	`data`  = CASE WHEN :data  <> '' THEN :data  ELSE `data`  END 

WHERE 
 `ID` = :ID
