Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        
            
                
                    
                        
                            
                                | Author | 
                                
                                 Topic  | 
                             
                            
                                    | 
                                         kakarotmf 
                                        Starting Member 
                                         
                                        
                                        2 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2011-07-08 : 11:44:18
                                            
  | 
                                             
                                            
                                            | Here is my Table:ID | Name | DateI want my query to look like this:ID | DateBut I want only unique Date values. I cannot use SELECT DISTINCT because all the ID fields are unique. I tried using JOIN commands byd referencing this one table as two tables using the AS command, but couldn't get that to work.Any suggestions? | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     russell 
                                    Pyro-ma-ni-yak 
                                     
                                    
                                    5072 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2011-07-08 : 12:33:07
                                          
  | 
                                         
                                        
                                          | How will you decide which ID should show up when there are more than one id per date?  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     kakarotmf 
                                    Starting Member 
                                     
                                    
                                    2 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2011-07-08 : 23:52:10
                                          
  | 
                                         
                                        
                                          | Hmm. Didn't think about that.I now see that I can't do what I want to do, and for good reason. After thinking about it some more, I see I set up my DATE Table incorrectly. Now that I've reorganized the DATE Table, I can write the (Lookup) Query I want to.Thanks!  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |