There is no need for a UNION - just include the second criterion in your WHERE statement e.g.
SELECT * FROM IMG_PDC_OUTWARDCLEARING AS T1
WHERE 1=1
AND (BATCH_NO = '7135001-000850')
AND (CLEARING_DATE = '2021-03-25')
AND (DOC_TYPE = '3' OR DOC_TYPE = '2')
Note where the brackets are when combining AND and OR clauses
[EDIT]
I have now realised that this is essentially a repost of https://www.codeproject.com/Questions/5301349/Get-unique-data-between-two-dates
If this solution is not appropriate for your problem, then try using the "Have a Question or Comment?" link next to this solution to explain what the problem actually is. Don't just post another question with no useful information in it - you need to explain your criteria for selecting the specific records
[EDIT 2] I have now worked out what your criteria are and this query should return the values you want
select slp_no,doc_type,clearing_Date,ui,batch_no
from IMG_PDC_OUTWARDCLEARING
where batch_no = '7135001-000850'
and slp_no IN (1,3)
and [clearing_Date] between '2020-02-25' and '2021-03-25'
Some points to note
- it is always better to list the columns you want than to use
select *
-
DOC_TYPE
is not relevent here - your results exclude
slp_no = 2
- Some experts claim that using
BETWEEN
with date ranges is a bad idea. I personally cannot see a problem with using it in this context as the date format takes away cultural difference issues, and by using
Date
type you won't run into problems caused by the time element of a date. Note however that if your database table has
CLEARING_DATE Datetime
then you will need to either convert to a date or use some other adjustment to make sure you include the "whole" day at each end of the range. E.g.
and CAST([clearing_Date] as Date) between '2020-02-25' and '2021-03-25'