Hi,
for your comment....
from [SO SHIPMENT/PENDING_STATUS] where [Shipment Date]<=@REPORT_DATE
try this ...
Select * from [SO SHIPMENT/PENDING_STATUS]
where
CASE WHEN ISNULL([Shipment Date],'')='' then ISNULL([Shipment Date],'')
ELSE ISNULL([Shipment Date],'') <=@REPORT_DATE END
Hope this will help you.
Cheers