a:1:{i:0;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:14:"fv2_beam_clean";s:4:"nome";s:9:"onExecute";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:1066:"$updatesql="
UPDATE sets
SET p_o_number='XXXX'
WHERE p_o_number='' 
OR 
setno='204528'
";
sc_exec_sql($updatesql);
$deletesql="DELETE from sets
WHERE (setno='' AND set_lbs=0) OR
setno='444228B'
OR
setno='BO2-0648'
OR
setno='B02-0648'
";
sc_exec_sql($deletesql);
$updatesql="
UPDATE sets
SET p_o_number='2403' 
WHERE 
p_o_number='XXXX' 
AND
 den='40'
";
sc_exec_sql($updatesql);
$updatesql="
UPDATE sets
SET 
p_o_number='2404' 
WHERE 
p_o_number='XXXX' 
AND
den='50'
";
sc_exec_sql($updatesql);
$fixpo="DROP TABLE tempsets";
sc_exec_sql($fixpo);
$fixpo="CREATE TABLE tempsets like sets";
sc_exec_sql($fixpo);
$fixpo="
INSERT into tempsets select * from sets 
where p_o_number='XXXX'
";
sc_exec_sql($fixpo);
$fixpo="
SET @rank:=2404";
$fixpo2="
UPDATE tempsets
SET p_o_number=@rank:=@rank+1";
sc_exec_sql($fixpo);
sc_exec_sql($fixpo2);
$fixpo="
DELETE FROM 
sets 
WHERE 
p_o_number='XXXX'";
sc_exec_sql($fixpo);
$fixpo="
INSERT into sets select * from tempsets";
sc_exec_sql($fixpo);
echo "Tables Cleaned.";";}}