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  | 
                             
                            
                                    | 
                                         0senjed0 
                                        Starting Member 
                                         
                                        
                                        1 Post  | 
                                        
                                        
                                            
                                            
                                             Posted - 2012-06-11 : 05:51:16
                                            
  | 
                                             
                                            
                                            | i have run my query in sql management studio and i see the result fine . but for second time everything faded . what should i doand of course for first time i saw the result fine with complete result but for second time when run the query again everything faded and i see just (0 row(s) affected)(0 row(s) affected)(0 row(s) affected)(0 row(s) affected)(0 row(s) affected)--================================== Query 1   BEGIN  ================================================use XXXXXselect *from CustomerMajariwhere     UserId is null    and    ID in (select CustomerMajariID            from CustomerMajariProduct            where IsKhorde=1 and (XXXX=1 or xxxxx=1 or XXXXX=1 orXXXXXX=1))goupdate CustomerMajariset    UserId='cm'+code    ,Password=code    ,active=1where     UserId is null    and    ID in (select CustomerMajariID            from CustomerMajariProduct            where IsKhorde=1 and (XXXX=1 or XXXX=1 or XXXXX=1 or XXXXXX=1))go--================================== Query 1   END  ================================================ | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     webfred 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    8781 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-06-11 : 06:38:08
                                          
  | 
                                         
                                        
                                          Are you kidding?You are updating the column values and after that the statemants can't give the same results as before... No, you're never too old to Yak'n'Roll if you're too young to die.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     jackv 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    2179 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-06-11 : 11:00:33
                                          
  | 
                                         
                                        
                                          | What is happening is logicalJack Vamvas--------------------http://www.sqlserver-dba.com  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |