IF EXISTS (SELECT 1 from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'r' and COLUMN_NAME = y )
IF charindex('k',@hdr_where)=0
INTO
IF EXISTS ((SELECT 1 from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME = 'r' and COLUMN_NAME = y ) and charindex('k',@hdr_where)=0)