IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSOBJECTS.name = 'LOGOZELSIGORTADETAY')
CREATE TABLE [dbo].[LOGOZELSIGORTADETAY](
	[HESAPISLID] [int] NOT NULL,
	[DOSYAID] [int] NOT NULL,
	[IslemAd] [nvarchar](100) NULL,
	[IslemKodTur] [nvarchar](50) NULL,
	[IslemKod] [nvarchar](50) NULL,
	[IslemKod2] [nvarchar](50) NULL,
	[Adet] [float] NULL,
	[IslemTarihi] [datetime] NULL,
	[TalepEdilenTutar] [float] NULL,
	[SigortaSirketininOdeyecegiTutar] [float] NULL,
	[LimitAsimindanKaynaklananHastaPayi] [float] NULL,
	[IstiraktenKaynaklananHastaPayi] [float] NULL,
	[KapsamDisiTutar] [float] NULL,
	[FaturaEdilmesiGerekenTutar] [float] NULL,
	[UyumsuzTutar] [float] NULL,
	[SgkTarafindanKarsilananTutar] [float] NULL,
	[Tevkifat] [float] NULL,
	[VergiOrani] [float] NULL,
	[MuhafiyetTutari] [float] NULL,
	[OdenmeyecekTutar] [float] NULL,
	[Karar] [nvarchar](50) NULL,
	[KararAciklama] [nvarchar](200) NULL,
	[Durum] [int] NULL,
	[Durumu] [nvarchar](100) NULL,
 CONSTRAINT [PK_LOGOZELSIGORTADETAY] PRIMARY KEY CLUSTERED 
(
	[HESAPISLID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[LOGOZELSIGORTADETAY]') AND name = N'IXD_LOGOZELSIGORTADETAY_DOSYAID')
	BEGIN
		CREATE NONCLUSTERED INDEX [IXD_LOGOZELSIGORTADETAY_DOSYAID] ON [dbo].[LOGOZELSIGORTADETAY]
		([DOSYAID] ASC) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
	END
GO