 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FATID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FATID'*/ ALTER TABLE FATURA ADD FATID int NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'SUBEID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'SUBEID'*/ ALTER TABLE FATURA ADD SUBEID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FIPTAL' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FIPTAL'*/ ALTER TABLE FATURA ADD FIPTAL smallint NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TARIH' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TARIH'*/ ALTER TABLE FATURA ADD TARIH datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'SAAT' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'SAAT'*/ ALTER TABLE FATURA ADD SAAT datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TUR' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TUR'*/ ALTER TABLE FATURA ADD TUR smallint NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FATGRUP' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FATGRUP'*/ ALTER TABLE FATURA ADD FATGRUP nvarchar(15) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FATNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FATNO'*/ ALTER TABLE FATURA ADD FATNO nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'VADE' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'VADE'*/ ALTER TABLE FATURA ADD VADE datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ACIKLAMA' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ACIKLAMA'*/ ALTER TABLE FATURA ADD ACIKLAMA nvarchar(500) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'CARIID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'CARIID'*/ ALTER TABLE FATURA ADD CARIID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'SIND' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'SIND'*/ ALTER TABLE FATURA ADD SIND float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TOPLAM' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TOPLAM'*/ ALTER TABLE FATURA ADD TOPLAM float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KDV' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KDV'*/ ALTER TABLE FATURA ADD KDV float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'GTOPLAM' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'GTOPLAM'*/ ALTER TABLE FATURA ADD GTOPLAM float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ADRES1' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ADRES1'*/ ALTER TABLE FATURA ADD ADRES1 nvarchar(200) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ADRES2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ADRES2'*/ ALTER TABLE FATURA ADD ADRES2 nvarchar(200) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ADRES3' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ADRES3'*/ ALTER TABLE FATURA ADD ADRES3 nvarchar(150) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'VD' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'VD'*/ ALTER TABLE FATURA ADD VD nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'VDNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'VDNO'*/ ALTER TABLE FATURA ADD VDNO nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'UNVANI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'UNVANI'*/ ALTER TABLE FATURA ADD UNVANI nvarchar(200) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'SATISTID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'SATISTID'*/ ALTER TABLE FATURA ADD SATISTID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'BAYIID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'BAYIID'*/ ALTER TABLE FATURA ADD BAYIID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OZELKOD1' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OZELKOD1'*/ ALTER TABLE FATURA ADD OZELKOD1 nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OZELKOD2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OZELKOD2'*/ ALTER TABLE FATURA ADD OZELKOD2 nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OZELKOD3' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OZELKOD3'*/ ALTER TABLE FATURA ADD OZELKOD3 nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OZELKOD4' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OZELKOD4'*/ ALTER TABLE FATURA ADD OZELKOD4 nvarchar(20) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OZELKOD5' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OZELKOD5'*/ ALTER TABLE FATURA ADD OZELKOD5 nvarchar(20) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OZELKOD6' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OZELKOD6'*/ ALTER TABLE FATURA ADD OZELKOD6 nvarchar(500) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OZELKOD7' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OZELKOD7'*/ ALTER TABLE FATURA ADD OZELKOD7 nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OZELKOD8' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OZELKOD8'*/ ALTER TABLE FATURA ADD OZELKOD8 nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OZELKOD9' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OZELKOD9'*/ ALTER TABLE FATURA ADD OZELKOD9 nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OZELKOD10' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OZELKOD10'*/ ALTER TABLE FATURA ADD OZELKOD10 nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'BARKODYAZ' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'BARKODYAZ'*/ ALTER TABLE FATURA ADD BARKODYAZ smallint NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODEMES' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODEMES'*/ ALTER TABLE FATURA ADD ODEMES nvarchar(20) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'YETKILI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'YETKILI'*/ ALTER TABLE FATURA ADD YETKILI nvarchar(101) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'USER' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'USER'*/ ALTER TABLE FATURA ADD [USER] nvarchar(20) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ONAKIT' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ONAKIT'*/ ALTER TABLE FATURA ADD ONAKIT float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OKK' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OKK'*/ ALTER TABLE FATURA ADD OKK float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OTICKET' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OTICKET'*/ ALTER TABLE FATURA ADD OTICKET float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OACIK' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OACIK'*/ ALTER TABLE FATURA ADD OACIK float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'VPARA' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'VPARA'*/ ALTER TABLE FATURA ADD VPARA float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FI'*/ ALTER TABLE FATURA ADD FI smallint NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'IRSALIYE' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'IRSALIYE'*/ ALTER TABLE FATURA ADD IRSALIYE bit NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TURADI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TURADI'*/ ALTER TABLE FATURA ADD TURADI nvarchar(15) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'STUTAR' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'STUTAR'*/ ALTER TABLE FATURA ADD STUTAR float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KASAID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KASAID'*/ ALTER TABLE FATURA ADD KASAID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'BANKAID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'BANKAID'*/ ALTER TABLE FATURA ADD BANKAID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'IND1' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'IND1'*/ ALTER TABLE FATURA ADD IND1 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'IND2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'IND2'*/ ALTER TABLE FATURA ADD IND2 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'IND3' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'IND3'*/ ALTER TABLE FATURA ADD IND3 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EK1' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EK1'*/ ALTER TABLE FATURA ADD EK1 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EK2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EK2'*/ ALTER TABLE FATURA ADD EK2 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EK3' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EK3'*/ ALTER TABLE FATURA ADD EK3 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'INDORAN1' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'INDORAN1'*/ ALTER TABLE FATURA ADD INDORAN1 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'INDORAN2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'INDORAN2'*/ ALTER TABLE FATURA ADD INDORAN2 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'INDORAN3' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'INDORAN3'*/ ALTER TABLE FATURA ADD INDORAN3 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EKORAN1' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EKORAN1'*/ ALTER TABLE FATURA ADD EKORAN1 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EKORAN2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EKORAN2'*/ ALTER TABLE FATURA ADD EKORAN2 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EKORAN3' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EKORAN3'*/ ALTER TABLE FATURA ADD EKORAN3 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DURUM' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DURUM'*/ ALTER TABLE FATURA ADD DURUM tinyint NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DOVIZKODU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DOVIZKODU'*/ ALTER TABLE FATURA ADD DOVIZKODU nvarchar(5) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DOVIZKURU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DOVIZKURU'*/ ALTER TABLE FATURA ADD DOVIZKURU float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DEPOID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DEPOID'*/ ALTER TABLE FATURA ADD DEPOID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'GTARIH' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'GTARIH'*/ ALTER TABLE FATURA ADD GTARIH datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'SEC' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'SEC'*/ ALTER TABLE FATURA ADD SEC bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MUHASEBE' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MUHASEBE'*/ ALTER TABLE FATURA ADD MUHASEBE nvarchar(1) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MUHENTSAYAC' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MUHENTSAYAC'*/ ALTER TABLE FATURA ADD MUHENTSAYAC int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MUHASEBER' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MUHASEBER'*/ ALTER TABLE FATURA ADD MUHASEBER nvarchar(1) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MUHENTSAYACR' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MUHENTSAYACR'*/ ALTER TABLE FATURA ADD MUHENTSAYACR int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODENDI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODENDI'*/ ALTER TABLE FATURA ADD ODENDI bit NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KESINTIVAR' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KESINTIVAR'*/ ALTER TABLE FATURA ADD KESINTIVAR bit NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MUHFC' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MUHFC'*/ ALTER TABLE FATURA ADD MUHFC int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TUTAR1' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TUTAR1'*/ ALTER TABLE FATURA ADD TUTAR1 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TUTAR2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TUTAR2'*/ ALTER TABLE FATURA ADD TUTAR2 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TUTAR3' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TUTAR3'*/ ALTER TABLE FATURA ADD TUTAR3 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'YAZONAY' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'YAZONAY'*/ ALTER TABLE FATURA ADD YAZONAY bit NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'SKODU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'SKODU'*/ ALTER TABLE FATURA ADD SKODU nvarchar(10) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KNO'*/ ALTER TABLE FATURA ADD KNO int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DOVIZTUTAR' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DOVIZTUTAR'*/ ALTER TABLE FATURA ADD DOVIZTUTAR float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'COUNTER' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'COUNTER'*/ ALTER TABLE FATURA ADD COUNTER int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'HESAPID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'HESAPID'*/ ALTER TABLE FATURA ADD HESAPID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KODU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KODU'*/ ALTER TABLE FATURA ADD KODU nvarchar(15) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ADI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ADI'*/ ALTER TABLE FATURA ADD ADI nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FTURU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FTURU'*/ ALTER TABLE FATURA ADD FTURU nvarchar(10) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FTARIHI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FTARIHI'*/ ALTER TABLE FATURA ADD FTARIHI datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FNO'*/ ALTER TABLE FATURA ADD FNO nvarchar(15) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OTARIHI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OTARIHI'*/ ALTER TABLE FATURA ADD OTARIHI datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KDVORAN' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KDVORAN'*/ ALTER TABLE FATURA ADD KDVORAN int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DTURU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DTURU'*/ ALTER TABLE FATURA ADD DTURU nvarchar(15) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DKURU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DKURU'*/ ALTER TABLE FATURA ADD DKURU float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'INDORAN' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'INDORAN'*/ ALTER TABLE FATURA ADD INDORAN float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'STOPLAM' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'STOPLAM'*/ ALTER TABLE FATURA ADD STOPLAM float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'INDTUTAR' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'INDTUTAR'*/ ALTER TABLE FATURA ADD INDTUTAR float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MATRAH' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MATRAH'*/ ALTER TABLE FATURA ADD MATRAH float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODENEN' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODENEN'*/ ALTER TABLE FATURA ADD ODENEN float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'PROFORMA' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'PROFORMA'*/ ALTER TABLE FATURA ADD PROFORMA bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OSEKLI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OSEKLI'*/ ALTER TABLE FATURA ADD OSEKLI nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'SEHIR' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'SEHIR'*/ ALTER TABLE FATURA ADD SEHIR nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ALANK' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ALANK'*/ ALTER TABLE FATURA ADD ALANK nvarchar(25) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KDVSEKLI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KDVSEKLI'*/ ALTER TABLE FATURA ADD KDVSEKLI nvarchar(5) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DTOPLAM' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DTOPLAM'*/ ALTER TABLE FATURA ADD DTOPLAM float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'T1' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'T1'*/ ALTER TABLE FATURA ADD T1 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'T2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'T2'*/ ALTER TABLE FATURA ADD T2 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'T3' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'T3'*/ ALTER TABLE FATURA ADD T3 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'LOGODANGELDI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'LOGODANGELDI'*/ ALTER TABLE FATURA ADD LOGODANGELDI bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FIPTALACIKLAMA' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FIPTALACIKLAMA'*/ ALTER TABLE FATURA ADD FIPTALACIKLAMA nvarchar(200) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FIPTALKULLANICI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FIPTALKULLANICI'*/ ALTER TABLE FATURA ADD FIPTALKULLANICI nvarchar(20) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FIPTALTARIH' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FIPTALTARIH'*/ ALTER TABLE FATURA ADD FIPTALTARIH datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KAPAMATARIH' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KAPAMATARIH'*/ ALTER TABLE FATURA ADD KAPAMATARIH datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KAPALI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KAPALI'*/ ALTER TABLE FATURA ADD KAPALI bit NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KURUMTIPI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KURUMTIPI'*/ ALTER TABLE FATURA ADD KURUMTIPI tinyint NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'INDHESAPID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'INDHESAPID'*/ ALTER TABLE FATURA ADD INDHESAPID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FBFIYAT' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FBFIYAT'*/ ALTER TABLE FATURA ADD FBFIYAT float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FATCOUNTER' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FATCOUNTER'*/ ALTER TABLE FATURA ADD FATCOUNTER int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KAPANAN' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KAPANAN'*/ ALTER TABLE FATURA ADD KAPANAN float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KTARIH' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KTARIH'*/ ALTER TABLE FATURA ADD KTARIH smalldatetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TADET' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TADET'*/ ALTER TABLE FATURA ADD TADET int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TCKIMLIKNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TCKIMLIKNO'*/ ALTER TABLE FATURA ADD TCKIMLIKNO nvarchar(25) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EMEKLISICILNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EMEKLISICILNO'*/ ALTER TABLE FATURA ADD EMEKLISICILNO nvarchar(25) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MAKBUZNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MAKBUZNO'*/ ALTER TABLE FATURA ADD MAKBUZNO nvarchar(20) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MASMERID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MASMERID'*/ ALTER TABLE FATURA ADD MASMERID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FATSERI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FATSERI'*/ ALTER TABLE FATURA ADD FATSERI nvarchar(5) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MODUL' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MODUL'*/ ALTER TABLE FATURA ADD MODUL int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'CARIID2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'CARIID2'*/ ALTER TABLE FATURA ADD CARIID2 int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DEPOFISID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DEPOFISID'*/ ALTER TABLE FATURA ADD DEPOFISID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'USERID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'USERID'*/ ALTER TABLE FATURA ADD USERID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MFATID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MFATID'*/ ALTER TABLE FATURA ADD MFATID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'AKTARILDI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'AKTARILDI'*/ ALTER TABLE FATURA ADD AKTARILDI int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FDIZAYNID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FDIZAYNID'*/ ALTER TABLE FATURA ADD FDIZAYNID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OZELKOD' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OZELKOD'*/ ALTER TABLE FATURA ADD OZELKOD nvarchar(15) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KAYITID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KAYITID'*/ ALTER TABLE FATURA ADD KAYITID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ENO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ENO'*/ ALTER TABLE FATURA ADD ENO nvarchar(20) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'HESAPID2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'HESAPID2'*/ ALTER TABLE FATURA ADD HESAPID2 int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'UNVANI2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'UNVANI2'*/ ALTER TABLE FATURA ADD UNVANI2 nvarchar(30) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'BORC' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'BORC'*/ ALTER TABLE FATURA ADD BORC float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ALACAK' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ALACAK'*/ ALTER TABLE FATURA ADD ALACAK float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DBORC' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DBORC'*/ ALTER TABLE FATURA ADD DBORC float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DALACAK' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DALACAK'*/ ALTER TABLE FATURA ADD DALACAK float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ALISHESAPID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ALISHESAPID'*/ ALTER TABLE FATURA ADD ALISHESAPID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'INDTOPLAM' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'INDTOPLAM'*/ ALTER TABLE FATURA ADD INDTOPLAM float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'GRUBU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'GRUBU'*/ ALTER TABLE FATURA ADD GRUBU int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ENTKAYNAK' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ENTKAYNAK'*/ ALTER TABLE FATURA ADD ENTKAYNAK nvarchar(20) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ISLEMTIPI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ISLEMTIPI'*/ ALTER TABLE FATURA ADD ISLEMTIPI nvarchar(30) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ACIKLAMA2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ACIKLAMA2'*/ ALTER TABLE FATURA ADD ACIKLAMA2 nvarchar(500) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DKAPANAN' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DKAPANAN'*/ ALTER TABLE FATURA ADD DKAPANAN float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KYTARIH' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KYTARIH'*/ ALTER TABLE FATURA ADD KYTARIH datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'GRUBU2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'GRUBU2'*/ ALTER TABLE FATURA ADD GRUBU2 nvarchar(20) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FIACIKLAMASIRALANSIN' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FIACIKLAMASIRALANSIN'*/ ALTER TABLE FATURA ADD FIACIKLAMASIRALANSIN bit NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'IADEF' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'IADEF'*/ ALTER TABLE FATURA ADD IADEF bit NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FATKDVDETAYLI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FATKDVDETAYLI'*/ ALTER TABLE FATURA ADD FATKDVDETAYLI bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'SARFBILDIR' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'SARFBILDIR'*/ ALTER TABLE FATURA ADD SARFBILDIR bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ULKEKODU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ULKEKODU'*/ ALTER TABLE FATURA ADD ULKEKODU nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OZELFIS' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OZELFIS'*/ ALTER TABLE FATURA ADD OZELFIS bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'PROFORMANO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'PROFORMANO'*/ ALTER TABLE FATURA ADD PROFORMANO nvarchar(30) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KODU2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KODU2'*/ ALTER TABLE FATURA ADD KODU2 nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MUHFISNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MUHFISNO'*/ ALTER TABLE FATURA ADD MUHFISNO int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MUHFISTARIH' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MUHFISTARIH'*/ ALTER TABLE FATURA ADD MUHFISTARIH datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'WEB' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'WEB'*/ ALTER TABLE FATURA ADD WEB nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EMAIL' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EMAIL'*/ ALTER TABLE FATURA ADD EMAIL nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TEL' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TEL'*/ ALTER TABLE FATURA ADD TEL nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FAX' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FAX'*/ ALTER TABLE FATURA ADD FAX nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'UUID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'UUID'*/ ALTER TABLE FATURA ADD UUID uniqueidentifier NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATNO'*/ ALTER TABLE FATURA ADD EFATNO nvarchar(20) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURAINDYOK' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURAINDYOK'*/ ALTER TABLE FATURA ADD EFATURAINDYOK bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KDVACIKLAMA' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KDVACIKLAMA'*/ ALTER TABLE FATURA ADD KDVACIKLAMA nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATTURU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATTURU'*/ ALTER TABLE FATURA ADD EFATTURU int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ISLEMTARIHI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ISLEMTARIHI'*/ ALTER TABLE FATURA ADD ISLEMTARIHI datetime NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURAZARF' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURAZARF'*/ ALTER TABLE FATURA ADD EFATURAZARF uniqueidentifier NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURA_ENTREFNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURA_ENTREFNO'*/ ALTER TABLE FATURA ADD EFATURA_ENTREFNO nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURA_CEVAPREFNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURA_CEVAPREFNO'*/ ALTER TABLE FATURA ADD EFATURA_CEVAPREFNO nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURA_CEVAPTARIHI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURA_CEVAPTARIHI'*/ ALTER TABLE FATURA ADD EFATURA_CEVAPTARIHI datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURA_CEVAPACK' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURA_CEVAPACK'*/ ALTER TABLE FATURA ADD EFATURA_CEVAPACK nvarchar(150) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURA_LOG' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURA_LOG'*/ ALTER TABLE FATURA ADD EFATURA_LOG nvarchar(255) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURA_SONGONTAR' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURA_SONGONTAR'*/ ALTER TABLE FATURA ADD EFATURA_SONGONTAR datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURADURUM' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURADURUM'*/ ALTER TABLE FATURA ADD EFATURADURUM int NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODEMEEMRIID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODEMEEMRIID'*/ ALTER TABLE FATURA ADD ODEMEEMRIID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURA_CEVAP_UUID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURA_CEVAP_UUID'*/ ALTER TABLE FATURA ADD EFATURA_CEVAP_UUID uniqueidentifier NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURA_CEVAPNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURA_CEVAPNO'*/ ALTER TABLE FATURA ADD EFATURA_CEVAPNO nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'SIPARISNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'SIPARISNO'*/ ALTER TABLE FATURA ADD SIPARISNO nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'SIPARISTARIHI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'SIPARISTARIHI'*/ ALTER TABLE FATURA ADD SIPARISTARIHI datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'IRSALIYENO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'IRSALIYENO'*/ ALTER TABLE FATURA ADD IRSALIYENO nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'IRSALIYETARIHI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'IRSALIYETARIHI'*/ ALTER TABLE FATURA ADD IRSALIYETARIHI datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURAACIKLAMA' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURAACIKLAMA'*/ ALTER TABLE FATURA ADD EFATURAACIKLAMA nvarchar(1200) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURA_PKUTUSU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURA_PKUTUSU'*/ ALTER TABLE FATURA ADD EFATURA_PKUTUSU nvarchar(250) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURAACIKLAMA2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURAACIKLAMA2'*/ ALTER TABLE FATURA ADD EFATURAACIKLAMA2 nvarchar(1200) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EFATURA_KABULREDNOTU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EFATURA_KABULREDNOTU'*/ ALTER TABLE FATURA ADD EFATURA_KABULREDNOTU nvarchar(255) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'IADEEDILENFATID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'IADEEDILENFATID'*/ ALTER TABLE FATURA ADD IADEEDILENFATID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'GIDERPUSULASI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'GIDERPUSULASI'*/ ALTER TABLE FATURA ADD GIDERPUSULASI bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ENTDURUM' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ENTDURUM'*/ ALTER TABLE FATURA ADD ENTDURUM tinyint NOT NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ENTKAYITNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ENTKAYITNO'*/ ALTER TABLE FATURA ADD ENTKAYITNO int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KDVSIZLIKKODU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KDVSIZLIKKODU'*/ ALTER TABLE FATURA ADD KDVSIZLIKKODU nvarchar(20) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EDEVLETDURUM' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EDEVLETDURUM'*/ ALTER TABLE FATURA ADD EDEVLETDURUM int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EDEVLET_ILETIMYONTEMI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EDEVLET_ILETIMYONTEMI'*/ ALTER TABLE FATURA ADD EDEVLET_ILETIMYONTEMI nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EVRAKTIPID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EVRAKTIPID'*/ ALTER TABLE FATURA ADD EVRAKTIPID tinyint NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODEMECIHAZID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODEMECIHAZID'*/ ALTER TABLE FATURA ADD ODEMECIHAZID smallint NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FISDURUMID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FISDURUMID'*/ ALTER TABLE FATURA ADD FISDURUMID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OKCREFNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OKCREFNO'*/ ALTER TABLE FATURA ADD OKCREFNO nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'OKCDURUM' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'OKCDURUM'*/ ALTER TABLE FATURA ADD OKCDURUM bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KALAN' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KALAN'*/ ALTER TABLE FATURA ADD KALAN float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KESINTI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KESINTI'*/ ALTER TABLE FATURA ADD KESINTI float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'SONODEMETARIH' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'SONODEMETARIH'*/ ALTER TABLE FATURA ADD SONODEMETARIH datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DONEMBASI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DONEMBASI'*/ ALTER TABLE FATURA ADD DONEMBASI datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DONEMSONU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DONEMSONU'*/ ALTER TABLE FATURA ADD DONEMSONU datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EVRAKREFNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EVRAKREFNO'*/ ALTER TABLE FATURA ADD EVRAKREFNO nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MUKELLEFKODU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MUKELLEFKODU'*/ ALTER TABLE FATURA ADD MUKELLEFKODU nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MUKELLEFADI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MUKELLEFADI'*/ ALTER TABLE FATURA ADD MUKELLEFADI nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ONLINE' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ONLINE'*/ ALTER TABLE FATURA ADD ONLINE bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ONLINE_WEBADRES' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ONLINE_WEBADRES'*/ ALTER TABLE FATURA ADD ONLINE_WEBADRES nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ONLINE_ODEMESEKLI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ONLINE_ODEMESEKLI'*/ ALTER TABLE FATURA ADD ONLINE_ODEMESEKLI nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ONLINE_ODEME_TARIHI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ONLINE_ODEME_TARIHI'*/ ALTER TABLE FATURA ADD ONLINE_ODEME_TARIHI datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ONLINE_GONDERIM_TARIHI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ONLINE_GONDERIM_TARIHI'*/ ALTER TABLE FATURA ADD ONLINE_GONDERIM_TARIHI datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ONLINE_GONDERIM_TASIYANTURU' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ONLINE_GONDERIM_TASIYANTURU'*/ ALTER TABLE FATURA ADD ONLINE_GONDERIM_TASIYANTURU nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ONLINE_GONDERIM_TASIYANKIMLIKNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ONLINE_GONDERIM_TASIYANKIMLIKNO'*/ ALTER TABLE FATURA ADD ONLINE_GONDERIM_TASIYANKIMLIKNO nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ONLINE_GONDERIM_TASIYANADI' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ONLINE_GONDERIM_TASIYANADI'*/ ALTER TABLE FATURA ADD ONLINE_GONDERIM_TASIYANADI nvarchar(100) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FISTURID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FISTURID'*/ ALTER TABLE FATURA ADD FISTURID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'VERGIMASMERATA' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'VERGIMASMERATA'*/ ALTER TABLE FATURA ADD VERGIMASMERATA bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ALTCARIID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ALTCARIID'*/ ALTER TABLE FATURA ADD ALTCARIID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ILCE' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ILCE'*/ ALTER TABLE FATURA ADD ILCE nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'YETKIID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'YETKIID'*/ ALTER TABLE FATURA ADD YETKIID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ISLEMGRUPID1' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ISLEMGRUPID1'*/ ALTER TABLE FATURA ADD ISLEMGRUPID1 int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ISLEMGRUPID2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ISLEMGRUPID2'*/ ALTER TABLE FATURA ADD ISLEMGRUPID2 int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ISLEMGRUPID3' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ISLEMGRUPID3'*/ ALTER TABLE FATURA ADD ISLEMGRUPID3 int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TEVKIFATTOPLAM' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TEVKIFATTOPLAM'*/ ALTER TABLE FATURA ADD TEVKIFATTOPLAM decimal NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'VERGITOPLAM' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'VERGITOPLAM'*/ ALTER TABLE FATURA ADD VERGITOPLAM float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'BABSHARIC' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'BABSHARIC'*/ ALTER TABLE FATURA ADD BABSHARIC bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DOVIZ' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DOVIZ'*/ ALTER TABLE FATURA ADD DOVIZ nvarchar(5) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'KUR' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'KUR'*/ ALTER TABLE FATURA ADD KUR float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODEMEHESAPID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODEMEHESAPID'*/ ALTER TABLE FATURA ADD ODEMEHESAPID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODEMEALTCARIID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODEMEALTCARIID'*/ ALTER TABLE FATURA ADD ODEMEALTCARIID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODEMEORAN' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODEMEORAN'*/ ALTER TABLE FATURA ADD ODEMEORAN float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODENENTUTAR' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODENENTUTAR'*/ ALTER TABLE FATURA ADD ODENENTUTAR float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODENMEYEN' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODENMEYEN'*/ ALTER TABLE FATURA ADD ODENMEYEN float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODEMEHESAPID2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODEMEHESAPID2'*/ ALTER TABLE FATURA ADD ODEMEHESAPID2 int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODEMEALTCARIID2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODEMEALTCARIID2'*/ ALTER TABLE FATURA ADD ODEMEALTCARIID2 int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODENENTUTAR2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODENENTUTAR2'*/ ALTER TABLE FATURA ADD ODENENTUTAR2 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODENMEYEN2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODENMEYEN2'*/ ALTER TABLE FATURA ADD ODENMEYEN2 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ODENMEYEN3' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ODENMEYEN3'*/ ALTER TABLE FATURA ADD ODENMEYEN3 float NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FISIVAR' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FISIVAR'*/ ALTER TABLE FATURA ADD FISIVAR bit NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FISNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FISNO'*/ ALTER TABLE FATURA ADD FISNO nvarchar(30) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FISHESAPID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FISHESAPID'*/ ALTER TABLE FATURA ADD FISHESAPID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FISHESAPID2' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FISHESAPID2'*/ ALTER TABLE FATURA ADD FISHESAPID2 int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'FISACIKLAMA' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'FISACIKLAMA'*/ ALTER TABLE FATURA ADD FISACIKLAMA nvarchar(250) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TFISID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TFISID'*/ ALTER TABLE FATURA ADD TFISID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TFISNO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TFISNO'*/ ALTER TABLE FATURA ADD TFISNO nvarchar(30) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TFISTARIH' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TFISTARIH'*/ ALTER TABLE FATURA ADD TFISTARIH datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'TFISACIKLAMA' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'TFISACIKLAMA'*/ ALTER TABLE FATURA ADD TFISACIKLAMA nvarchar(250) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'PROJEID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'PROJEID'*/ ALTER TABLE FATURA ADD PROJEID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MERKEZFISID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MERKEZFISID'*/ ALTER TABLE FATURA ADD MERKEZFISID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MERKEZIFC' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MERKEZIFC'*/ ALTER TABLE FATURA ADD MERKEZIFC int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MASADURUMID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MASADURUMID'*/ ALTER TABLE FATURA ADD MASADURUMID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'MASANO' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'MASANO'*/ ALTER TABLE FATURA ADD MASANO nvarchar(50) NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ADD_USERID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ADD_USERID'*/ ALTER TABLE FATURA ADD ADD_USERID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'ADD_DATE' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'ADD_DATE'*/ ALTER TABLE FATURA ADD ADD_DATE datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EDIT_USERID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EDIT_USERID'*/ ALTER TABLE FATURA ADD EDIT_USERID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'EDIT_DATE' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'EDIT_DATE'*/ ALTER TABLE FATURA ADD EDIT_DATE datetime NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DEL_USERID' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DEL_USERID'*/ ALTER TABLE FATURA ADD DEL_USERID int NULL END 
 IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id WHERE SYSCOLUMNS.NAME = 'DEL_DATE' AND SYSOBJECTS.name = 'FATURA')  BEGIN /*PRINT 'DEL_DATE'*/ ALTER TABLE FATURA ADD DEL_DATE datetime NULL END 