if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[FAT_ELPARAM]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

/****** Object:  Table [dbo].[FAT_ELPARAM]    Script Date: 30/11/2018 11:31:02 ******/

CREATE TABLE [dbo].[FAT_ELPARAM](
	[id_ditta] [bigint] NOT NULL CONSTRAINT [DF_FATEL_PARAM_id_ditta]  DEFAULT ((0)),
	[IdCodicetrasmittente] [char](20) NOT NULL CONSTRAINT [DF_FATEL_PARAM_IdCodicetrasmittente]  DEFAULT (''),
	[IdPaese] [char](10) NOT NULL CONSTRAINT [DF_FATEL_PARAM_IdPaese]  DEFAULT (''),
	[FormatoTrasmissione] [char](10) NOT NULL CONSTRAINT [DF_FATEL_PARAM_FormatoTrasmissione]  DEFAULT (''),
	[telefonotrasmittente] [char](20) NOT NULL CONSTRAINT [DF_FATEL_PARAM_telefonotrasmittente]  DEFAULT (''),
	[emailtrasmittente] [char](200) NOT NULL CONSTRAINT [DF_FATEL_PARAM_emailtrasmittente]  DEFAULT (''),
	[IdCodice_tras] [char](20) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_IdCodicetrasmittente1]  DEFAULT (''),
	[IdPaese_tras] [char](10) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_IdPaese1]  DEFAULT (''),
	[idcodfisc_tras] [char](20) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_idcodfisc_tras]  DEFAULT (''),
	[Denominazione_tras] [char](80) NOT NULL CONSTRAINT [DF_FATEL_PARAM_Denominazione_tras]  DEFAULT (''),
	[Nome_tras] [char](60) NOT NULL CONSTRAINT [DF_FATEL_PARAM_Nome_tras]  DEFAULT (''),
	[Cognome_tras] [char](60) NOT NULL CONSTRAINT [DF_FATEL_PARAM_Cognome_tras]  DEFAULT (''),
	[Titolo_tras] [char](10) NOT NULL CONSTRAINT [DF_FATEL_PARAM_Titolo_tras]  DEFAULT (''),
	[CodEORI_tras] [char](20) NOT NULL CONSTRAINT [DF_FATEL_PARAM_CodEORI_tras]  DEFAULT (''),
	[sede_tras_Indirizzo] [char](60) NOT NULL CONSTRAINT [DF_FATEL_PARAM_sede_tras_Indirizzo]  DEFAULT (''),
	[sede_tras_NumeroCivico] [char](8) NOT NULL CONSTRAINT [DF_FATEL_PARAM_sede_tras_NumeroCivico]  DEFAULT (''),
	[sede_tras_CAP] [char](5) NOT NULL CONSTRAINT [DF_FATEL_PARAM_sede_tras_CAP]  DEFAULT (''),
	[sede_tras_Comune] [char](60) NOT NULL CONSTRAINT [DF_FATEL_PARAM_sede_tras_Comune]  DEFAULT (''),
	[sede_tras_Provincia] [char](2) NOT NULL CONSTRAINT [DF_FATEL_PARAM_sede_tras_Provincia]  DEFAULT (''),
	[sede_tras_Nazione] [char](2) NOT NULL CONSTRAINT [DF_FATEL_PARAM_sede_tras_Nazione]  DEFAULT (''),
	[telefonotras] [char](20) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_telefonotrasmittente1]  DEFAULT (''),
	[emailtras] [char](200) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_emailtrasmittente1]  DEFAULT (''),
	[faxtras] [char](20) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_faxtas]  DEFAULT (''),
	[regimefiscale] [char](10) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_regimefiscale]  DEFAULT (''),
	[EsigibilitaIVA] [char](1) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_EsigibilitaIVA]  DEFAULT (''),
	[TipoTrasmissine] [int] NOT NULL CONSTRAINT [DF_FAT_ELPARAM_TipoTrasmissine]  DEFAULT (''),
	[ftp_server] [char](100) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_ftp_server]  DEFAULT (''),
	[ftp_utente] [char](50) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_ftp_utente]  DEFAULT (''),
	[ftp_password] [char](50) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_ftp_password]  DEFAULT (''),
	[ftp_porta] [int] NOT NULL CONSTRAINT [DF_FAT_ELPARAM_ftp_porta]  DEFAULT ((0)),
	[ftp_chiavessh] [char](200) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_ftp_chiavessh]  DEFAULT (''),
	[pec_ServerSMTP] [char](50) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_pec_ServerSMTP]  DEFAULT (''),
	[pec_EMailMittente] [char](50) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_pec_EMailMittente]  DEFAULT (''),
	[pec_NomeVisualizzato] [char](50) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_pec_NomeVisualizzato]  DEFAULT (''),
	[pec_UserName] [char](50) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_pec_UserName]  DEFAULT (''),
	[pec_Password] [char](50) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_pec_Password]  DEFAULT (''),
	[pec_Porta] [int] NOT NULL CONSTRAINT [DF_FAT_ELPARAM_pec_Porta]  DEFAULT ((0)),
	[pec_emaildovesped] [char](50) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_pec_emaildovesped]  DEFAULT (''),
	[pec_ancheame] [int] NOT NULL CONSTRAINT [DF_FAT_ELPARAM_pec_ancheame]  DEFAULT ((0)),
	[cartella_altra_applic] [char](100) NOT NULL CONSTRAINT [DF_FAT_ELPARAM_cartella_altra_applic]  DEFAULT (''),
 CONSTRAINT [PK_FATEL_PARAM] PRIMARY KEY CLUSTERED 
(
	[id_ditta] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]


SET ANSI_PADDING OFF
GO


