IF NOT EXISTS(SELECT * FROM SYS.TABLES WHERE NAME='HYATISAGRI')
CREATE TABLE [dbo].HYATISAGRI(
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[HYATISID] [int] NULL,
	[AGRIACIKLAMA] [nvarchar](250) NULL,
	[AGRISEVIYESI] [int] NULL,

	[DAVRANISSALSKALA_YI] [int] NULL,
	
	[DAVRANISSALSKALA_AK] [int] NULL,

	[DAVRANISSALSKALA_BH] [int] NULL,

	[DAVRANISSALSKALA_AG] [int] NULL,

	[DAVRANISSALSKALA_AV] [int] NULL,

	[NIPS_YI] [int] NULL,

	[NIPS_AG] [int] NULL,
	
	[NIPS_SK] [int] NULL,

	[NIPS_KL] [int] NULL,

	[NIPS_BC] [int] NULL,
	
	[NIPS_UY] [int] NULL,
	
	[AGRINITELIGI01] [bit] NULL,
	[AGRINITELIGI02] [bit] NULL,
	[AGRINITELIGI03] [bit] NULL,
	[AGRINITELIGI04] [bit] NULL,
	[AGRINITELIGI05] [bit] NULL,
	[AGRINITELIGI06] [bit] NULL,
	[AGRINITELIGI07] [bit] NULL,
	[AGRINITELIGI08] [bit] NULL,
	[AGRINITELIGI09] [bit] NULL,
	[AGRINITELIGI10] [bit] NULL,
	[AGRINITELIGI11] [bit] NULL,
	[AGRINITELIGI12] [bit] NULL,
	[AGRINITELIGI13] [bit] NULL,
	[AGRINITELIGI14] [bit] NULL,
	[AGRINITELIGI15] [bit] NULL,
	[AGRINITELIGI16] [bit] NULL,
	[AGRINITELIGIDIGER] [nvarchar](100) NULL,
	[HEMSIREBAKIMPLANI] [nvarchar](100) NULL,		
	[KYUSER] [nvarchar](20) NULL,
	[KYTARIH] [datetime] NULL,
	[TARIH] [datetime] NULL,
 CONSTRAINT [PK_HYATISAGRI] PRIMARY KEY CLUSTERED 
(
	[ID] 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.TABLES WHERE NAME='HYATISAGRITAKIP')
CREATE TABLE [dbo].HYATISAGRITAKIP(
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[HYATISAGRIID] [int] NULL,
	[TARIH] [datetime] NULL,
	[DEGNO] [nvarchar](25) NULL,
	[AGRIDUZEYI] [nvarchar](25) NULL,
	[UYGULAMA] [nvarchar](25) NULL,
	[HEMSIREFAALIYET] [nvarchar](100) NULL,
	[BAKIMDEGERLENDIRME] [nvarchar](100) NULL,	
	[SPID] [int] NULL,
	[KYUSER] [nvarchar](20) NULL,
	[KYTARIH] [datetime] NULL,
	
 CONSTRAINT [PK_HYATISAGRITAKIP] PRIMARY KEY CLUSTERED 
(
	[ID] 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