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  | 
                             
                            
                                    | 
                                         yguyon 
                                        Starting Member 
                                         
                                        
                                        11 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2015-02-10 : 16:05:15
                                            
  | 
                                             
                                            
                                            | I would like to write a delete statement that delete some row based from this querry ...SELECT EcommTransID, EcommAuthCode, EcommLast4, EcommAmount, EcommCurrency, EcommSource, EcommNumInv, EcommNumPO, EcommCardType, EcommTransDate, EcommSettleDateFROM dbo.Acct_EcommSiteTransactionStaging--EXCEPTINTERSECTSELECT EcommTransID, EcommAuthCode, EcommLast4, EcommAmount, EcommCurrency, EcommSource, EcommNumInv, EcommNumPO, EcommCardType, EcommTransDate, EcommSettleDateFROM dbo.Acct_EcommSiteTransaction | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     gbritton 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    2780 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2015-02-10 : 16:11:16
                                          
  | 
                                         
                                        
                                          | DELETE FROM tableJOIN (... your original query) qon q.EcommTransID = table.EcommTransIDand q.EcommAuthCode = table.EcommAuthCodeand ...  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |   
     
     
            
              
	     |  
		
			
     
          
		 |