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  | 
                             
                            
                                    | 
                                         peace 
                                        Constraint Violating Yak Guru 
                                         
                                        
                                        420 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2012-03-23 : 00:28:26
                                            
  | 
                                             
                                            
                                            | How can i update with inner join and where claus?want to update passenger table to update the exact country.As in the View table I cant update.View passenger table:ID Name PNumber Country1  Jane  12345  JPPassenger table:ID Name PNumber1  Jane  12345COuntry table:ID Country1U  USContact table:ID Name Pnumber1  Jane 1234 | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     visakh16 
                                    Very Important crosS Applying yaK Herder 
                                     
                                    
                                    52326 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-03-23 : 00:40:21
                                          
  | 
                                         
                                        
                                          | howzz country table related to other tables?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     peace 
                                    Constraint Violating Yak Guru 
                                     
                                    
                                    420 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-03-23 : 00:44:01
                                          
  | 
                                         
                                        
                                          | In my View table there is CountryView passenger table:ID Name PNumber Country1  Jane  12345     JPBut i cannot update View table  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     visakh16 
                                    Very Important crosS Applying yaK Herder 
                                     
                                    
                                    52326 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-03-23 : 00:47:49
                                          
  | 
                                         
                                        
                                          | so does JP correspond to ID field in Country table?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     peace 
                                    Constraint Violating Yak Guru 
                                     
                                    
                                    420 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-03-23 : 00:56:14
                                          
  | 
                                         
                                        
                                          | If i select will be like this :SELECT  A.Id,C.emailaddress1,C.firstname, [Country].Aa_shortcodeFROM A INNER JOIN BON C.Id = B.Id LEFT JOIN countryDetails[Country] ON  [Country].countryId = B.addresscountryidWHERE emailaddress1 in ('abc@c.com')  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     peace 
                                    Constraint Violating Yak Guru 
                                     
                                    
                                    420 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-03-23 : 01:00:56
                                          
  | 
                                         
                                        
                                          | Would like to update this guest country ('abc@c.com')From JP to US  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     visakh16 
                                    Very Important crosS Applying yaK Herder 
                                     
                                    
                                    52326 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-03-23 : 01:21:19
                                          
  | 
                                         
                                        
                                          | your explanation doesnt make any sense. post proper data and explain your problem...otherwise we wont be able to help...------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     sarathy 
                                    Starting Member 
                                     
                                    
                                    2 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-03-23 : 11:54:07
                                          
  | 
                                         
                                        
                                          | Hi Used this query for Inner join with using where condition, you get answerselect * from table 1 NF inner join table2 NP on nf.ID=np.ID inner join table3 NC on nf.ID= NC.ID where NF.Pnumbaer=12345S.Partahasarthy  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     visakh16 
                                    Very Important crosS Applying yaK Herder 
                                     
                                    
                                    52326 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-03-23 : 19:56:52
                                          
  | 
                                         
                                        
                                          | wont work as per posted data as ID value is not same in Country table------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |