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 |  
                                    | leon1958Starting Member
 
 
                                        4 Posts | 
                                            
                                            |  Posted - 2013-09-08 : 00:24:09 
 |  
                                            | Dear Friends in SQL,I have two temporary tables, one a Master with the key columns as subject name andsubject idI have another transaction table where the main key column is subjectid I want to extract only those subject id's which are not there in the transaction, but there in the master.What is below is only a simplified version of my actual code, but it will serve the purpose.Master tableSubjectId   Subject Name   01          English   02          Hindi   03          Marathi   04          MathsTransaction TableSubjectid     Studentid   02           10001   02           10002   04           10001My select or code should give me the subjectids 01 and 03Please help!!LeonSunPower |  |  
                                    | tkizerAlmighty SQL Goddess
 
 
                                    38200 Posts |  |  
                                    | leon1958Starting Member
 
 
                                    4 Posts |  |  
                                |  |  |  |