Fixed sql error

Signed-off-by: Peter <mcheung63@hotmail.com>