1234567 SELECT *FROM INSAMSTwhere (@gubun = 'Y' AND (ToiDate != '____/__/__' and ToiDate = @ToiDate OR ToiDate = '____/__/__')) Colored by Color Scriptercs 1234567891011121314and ( (@GuBun = 'Y' AND (Insa.ToiDate >= @ToiDate or Insa.ToiDate = '____/__/__')) or (@GuBun = 'N' and Insa.ToiDate != '____/__/__' and Insa.ToiDate