I’m writing an sql server query:
select * from vwApplicationList
where status='Unassigned' AND
BBL like '%' + @BBL + '%' AND
UnitOrAppartmentNumber like '%'+@Appartment+'%' AND
ResidenceTypeDescription like '%'+@ResidenceTypeDescription+'%' AND
SN1 like '%'+@SN1+'%' AND
SN2 like '%'+@SN2+'%'
The problem is that the field “SN2” is null in several records. So how can I compare them?
If you want a positive result on the comparison:
If you want a negative result (assuming
@SN2is not also an empty string):