question

lanreok99 avatar image
lanreok99 asked

Filtering Nulls from dbo.dim_report

Hello, I have a table consisting of Products dimension. i am trying to filter products without dimensions. some products have length but doesnt have height, width etc is there a way to filter only the products without dimensions in the table![alt text][1] [1]: /storage/temp/4490-filtering-nulls.png
sql-server-2012
filtering-nulls.png (57.7 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Kev Riley avatar image
Kev Riley answered
To get all the products where none of the dimensions are populated then use where Height is null and Length is null and Width is null To get all those products where at least one of the dimensions is not populated, then where (Height is null or Length is null or Width is null)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.