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

Query help with distinct

$
0
0

Hi All,

I wrote this query to pull the data.

      

 Select [custid]    
      ,[firstname]
      ,[lastname]
      ,[addrline1]
      ,[addrline2]
      ,[city]
      ,[zip]
      ,[stateid]
      ,[secphone]
      ,[email]
      ,S.StateName

     from Customer C Inner join States S on C.stateid = S.stateID 
    where email  IS NOT NULL

It pulling all the data now i want to make sure i only pully rows unique by email.

Can someone please help


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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