• Just check if you are looking some thing like this Query,

    update testtable1

    set lotCurrentQty = 0,

    lotNetWeight = 0 ,

    NbPal = 0

    where id not in (

    Select * from testtable1

    where spcode is not null

    group by spCode)

    But Please do prepare some DDL and INSERT statements as Sean Lange mentioned, will help us to help you.