I have below query inside sp.

select groupno,a from table1
where groupno <> 'Test'

It is not returning rows where groupno is null. I did recompile sp with SET ANSI_NULLS off. But it is not working. Any suggestions? Please help

thank you

Recommended Answers

All 2 Replies

select groupno,a from table1
where groupno <> 'Test' OR groupno is null

If yo want to match for two conditions then you have to specify that in the sql query.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.