Skip to content
Advertisement

I can’t get rows have NULL on all rows for column zfeaturekey based on zplid and code type?

I work with SQL Server 2012. I have an issue I can’t get rows from table #gen when it has Null only on all rows on zfeaturekey field based on zplid and codetypeid.

I need to get rows that have NULL only on all rows ON zfeaturekey, but must be same codetypeid and same zplid .

Output:

This is the result I need:

I will not take zplid = 26777 because it has Null and values as 1502280005 on another rows.

I need to select where feature is NULL on all rows by zplid and codetypeid .

Advertisement

Answer

You can use the group by and having.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement