123 lines
2.9 KiB
Transact-SQL
123 lines
2.9 KiB
Transact-SQL
create table AnagraficaStatiOld(
|
|
IdxStato int not null,
|
|
Descrizione nvarchar(50),
|
|
Semaforo nvarchar(50),
|
|
Priorita int,
|
|
ClasseTempo nvarchar(50)
|
|
)
|
|
go
|
|
|
|
|
|
--
|
|
|
|
create table DatiConf_old(
|
|
IdxConferma int not null identity,
|
|
IdxODL int not null,
|
|
DataOraApp datetime not null,
|
|
DataRif datetime not null,
|
|
TurnoRif int,
|
|
CodArticolo nvarchar(50),
|
|
IdxMacchina nvarchar(50) not null,
|
|
TCAssegnato decimal(18,8),
|
|
MatrOpr int,
|
|
MatrApp int not null,
|
|
DataOraFrom datetime,
|
|
DataOraTo datetime,
|
|
IdxStato int not null,
|
|
TotPzProd int,
|
|
TempoProdotto decimal(18,8),
|
|
TempoCron decimal(18,8),
|
|
TempoND decimal(18,8),
|
|
TempoApertura decimal(18,8),
|
|
TempoOFF decimal(18,8),
|
|
TempoON decimal(18,8),
|
|
TempoFermoOn decimal(18,8),
|
|
TempoAuto decimal(18,8),
|
|
TempoFermoAuto decimal(18,8),
|
|
TempoRun decimal(18,8),
|
|
TotPzFermo int
|
|
)
|
|
go
|
|
|
|
|
|
--
|
|
|
|
create table DatiConf_older(
|
|
IdxConferma int not null identity,
|
|
IdxODL int not null,
|
|
DataOraApp datetime not null,
|
|
DataRif datetime not null,
|
|
TurnoRif int,
|
|
CodArticolo nvarchar(50),
|
|
IdxMacchina nvarchar(50) not null,
|
|
TCAssegnato decimal(18,8),
|
|
MatrOpr int,
|
|
MatrApp int not null,
|
|
DataOraFrom datetime,
|
|
DataOraTo datetime,
|
|
IdxStato int not null,
|
|
TotPzProd int,
|
|
TempoProdotto decimal(18,8),
|
|
TempoCron decimal(18,8),
|
|
TempoND decimal(18,8),
|
|
TempoApertura decimal(18,8),
|
|
TempoOFF decimal(18,8),
|
|
TempoON decimal(18,8),
|
|
TempoFermoOn decimal(18,8),
|
|
TempoAuto decimal(18,8),
|
|
TempoFermoAuto decimal(18,8),
|
|
TempoRun decimal(18,8),
|
|
TotPzFermo int
|
|
)
|
|
go
|
|
|
|
|
|
--
|
|
|
|
create table DatiProd_old(
|
|
IdxConferma int not null identity,
|
|
IdxODL int not null,
|
|
DataOraApp datetime not null,
|
|
DataRif datetime not null,
|
|
TurnoRif int,
|
|
CodArticolo nvarchar(50),
|
|
IdxMacchina nvarchar(50) not null,
|
|
TCAssegnato decimal(18,8),
|
|
MatrOpr int,
|
|
MatrApp int not null,
|
|
DataOraFrom datetime,
|
|
DataOraTo datetime,
|
|
TotPzProd int,
|
|
Tempo decimal(18,8),
|
|
ClasseTempo nvarchar(50)
|
|
)
|
|
go
|
|
|
|
|
|
--
|
|
|
|
create table DatiProd_older(
|
|
IdxConferma int not null identity,
|
|
IdxODL int not null,
|
|
DataOraApp datetime not null,
|
|
DataRif datetime not null,
|
|
TurnoRif int,
|
|
CodArticolo nvarchar(50),
|
|
IdxMacchina nvarchar(50) not null,
|
|
TCAssegnato decimal(18,8),
|
|
MatrOpr int,
|
|
MatrApp int not null,
|
|
DataOraFrom datetime,
|
|
DataOraTo datetime,
|
|
TotPzProd int,
|
|
Tempo decimal(18,8),
|
|
ClasseTempo nvarchar(50)
|
|
)
|
|
go
|
|
|
|
|
|
--
|
|
|
|
-- registro versione...
|
|
INSERT INTO [dbo].[LogUpdateDb] ([Versione],[Data]) VALUES(301, GETDATE())
|
|
GO |