Proyecto

General

Perfil

Feature #315 » 03. Script add columns values categories.sql

Michael Cobacango, 2025-06-02 12:38

 
alter table "catCategory_nom035"
rename column "MaxCat465" to maxvalue;


alter table "catCategory_nom035"
drop column "MaxCat466";

alter table "catCategory_nom035"
add P1 integer;

alter table "catCategory_nom035"
add P2 integer;

alter table "catCategory_nom035"
add P3 integer;

alter table "catCategory_nom035"
add P4 integer;



alter table "catCategory_nom035"
rename column p1 to "P1";

alter table "catCategory_nom035"
rename column p2 to "P2";

alter table "catCategory_nom035"
rename column p3 to "P3";

alter table "catCategory_nom035"
rename column p4 to "P4";


UPDATE public."catCategory_nom035"
SET "P1" = 10,
"P2" = 20,
"P3" = 30,
"P4" = 40
WHERE "Id" = 2;

UPDATE public."catCategory_nom035"
SET "P1" = 10,
"P2" = 18,
"P3" = 28,
"P4" = 38
WHERE "Id" = 4;

UPDATE public."catCategory_nom035"
SET "P1" = 3,
"P2" = 5,
"P3" = 7,
"P4" = 9
WHERE "Id" = 1;

UPDATE public."catCategory_nom035"
SET "P1" = 4,
"P2" = 6,
"P3" = 9,
"P4" = 12
WHERE "Id" = 3;
(6-6/8)