Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

selecting correct rows

$
0
0

I am having trouble selecting the correct rows, as I have got duplicate rows in my table.

Column 1                  Column 2                        Column 3                             Column 4

1                                bob                                null                                       null

2                               fred                                null                                        null

3                              simon                              red                                        200                                     

4                              simon                              null                                       null 

5                                ted                                blue                                      150 

Ok so in the where statement you can change it to pick up only the null values or anythig with a value on it. 

However if I want to get null values and also line 3 as well.  Do I have to use a case statement as well ?


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>