IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'NETTOPLAM' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE FATURA ADD NETTOPLAM float
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'TINDEK' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE FATURA ADD TINDEK float
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'NTOPLAM' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE FATURA ADD NTOPLAM float
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'DTUTAR' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE FATURA ADD DTUTAR float
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'DSIND' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE FATURA ADD DSIND float
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'DNETTOPLAM' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE FATURA ADD DNETTOPLAM float
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'DTINDEK' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE FATURA ADD DTINDEK float
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'DNTOPLAM' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE FATURA ADD DNTOPLAM float
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'DVERGITOPLAM' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE FATURA ADD DVERGITOPLAM float
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'DTEVKIFATTOPLAM' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE FATURA ADD DTEVKIFATTOPLAM float
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'DKDV' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE FATURA ADD DKDV float
GO

IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'DTOPLAM' AND SYSOBJECTS.name = 'FATURA')
ALTER TABLE FATURA ADD DTOPLAM float
GO

