/*==============================================================*/
/* Upgrade struktury z wersji 63 do 64                          */
/*==============================================================*/

UPDATE Barcode SET Code = CASE WHEN length(Code) <= 5 AND CodeTango is not null AND CodeTango NOT LIKE '' THEN ltrim(Code, '0') ELSE Code END
GO

/* Update numeru struktury */
UPDATE StructureVersion SET Version = 64
GO
