Use @DBNAME


if Exists(select CHARACTER_MAXIMUM_LENGTH from INFORMATION_SCHEMA.COLUMNS
	where TABLE_NAME='webClockDmp' AND COLUMN_NAME='KartNo'
	AND CHARACTER_MAXIMUM_LENGTH < 10)
BEGIN 
	  ALTER TABLE webClockDmp
	  ALTER COLUMN KARTNO char(10) NOT NULL
END

