IF NOT EXISTS (SELECT * FROM SYSCOLUMNS INNER JOIN SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
               WHERE SYSCOLUMNS.NAME = 'KISALTMA' AND SYSOBJECTS.name = 'TILACKULSEKLI')
ALTER TABLE dbo.TILACKULSEKLI ADD
	KISALTMA NVARCHAR(3) NULL
GO

UPDATE TILACKULSEKLI SET KISALTMA='O' WHERE ILACKULSEKLIADI LIKE '%Ağızdan (Oral)%'
UPDATE TILACKULSEKLI SET KISALTMA='IV' WHERE ILACKULSEKLIADI LIKE '%ntra%' AND (ILACKULSEKLIADI LIKE '%venöz%' OR ILACKULSEKLIADI LIKE '%venoz%')
UPDATE TILACKULSEKLI SET KISALTMA='IA' WHERE ILACKULSEKLIADI LIKE '%ntra%' AND (ILACKULSEKLIADI LIKE '%rteriyel%')
UPDATE TILACKULSEKLI SET KISALTMA='IT' WHERE ILACKULSEKLIADI LIKE '%ntra%' AND (ILACKULSEKLIADI LIKE '%tekal%')
UPDATE TILACKULSEKLI SET KISALTMA='ID' WHERE ILACKULSEKLIADI LIKE '%ntra%' AND (ILACKULSEKLIADI LIKE '%diskal%')
UPDATE TILACKULSEKLI SET KISALTMA='R' WHERE ILACKULSEKLIADI LIKE '%Rektal%'
GO