Actions
Tareas #199
closedEnlarge COUSUA to 45 characters
Start date:
08/02/2018
Due date:
08/05/2018
% Done:
100%
Estimated time:
4:00 h (Total: 8:00 h)
Spent time:
(Total: 4:00 h)
Puntos de historia:
4
Description
Take a list of COUSUA from ATCL table:
SELECT * FROM ATCL WHERE CODATR IN ('COUSUA', 'CODAUT', 'AUULMO')
Prepare SQL script to alter column cousua of the tables extracted from the list of ATCL
select concat('ALTER TABLE ', vaclob, ' ALTER COLUMN ', codatr, ' TYPE VARCHAR(45);') as sql from atcl where codatr in ('COUSUA', 'CODAUT', 'AUULMO') and coinob in (select coinob from objm where tiobme='CD' and coobme='OBJM') and subcla='CD' order by vaclob; update atcl set longitud=45.00 where codatr in ('COUSUA', 'CODAUT', 'AUULMO') and coinob in (select coinob from objm where tiobme='CD' and coobme='OBJM') order by vaclob; select concat('UPDATE ', vaclob, ' SET ', codatr, ' =''jfreire'' WHERE ', codatr, ' = ''FMJ000'';') as sql from atcl where codatr in ('COUSUA', 'CODAUT', 'AUULMO') and coinob in (select coinob from objm where tiobme='CD' and coobme='OBJM') and subcla='CD' order by vaclob;
List of users:
jfreire FMJ000
maria HPM000
antoniofreire FMA000
Actions