When I am using sqladaptor at receive port it is repeting all node number of database records Examp

ALter PROCEDURE MoserBaer_GetConsolidatedData_ForInvoice 
 
AS
BEGIN
 
 SET NOCOUNT ON;

  
 SELECT * from T_Invoice for XMl auto--,XMLDATA
END
GO

I am using sql adatptor at receive port fro generating invoice in xml format…It is generating the invoices But i am facing one problem like if there are 4 records in database it is repeating every node 4 time in invoices but my requirement is to generate
4 separate invoices..

how can i do this please help me…..

i am apsting my schema and procedure here also



  
   
    
     
      
       
        
         
          
         
        
       
       
        
         
          
           
            
             
             
              
               
                
               
              
             
            
           
          
          
           
            
             
             
             
            
           
          
         
        
       
       
        
         
          
           
            
             
             
              
               
                
               
              
             
            
           
          
          
           
            
             
             
             
            
           
          
         
        
       
      
     
    
    
     
      
       
        
         
          
          
          
           
            
             
            
           
          
          
           
            
             
            
           
          
          
           
            
             
            
           
          
          
           
            
             
            
           
          
          
           
            
             
              
               
              
             
             
            
           
          
          
         
         
        
       
       
        
         
          
           
            
             
              
               
                
                
                 
                  
                   
                  
                 
                
               
              
             
             
              
               
                
                
                
               
              
             
            
           
          
          
           
            
             
              
               
                
                
                 
                  
                   
                  
                 
                
               
              
             
             
              
               
                
                
                
               
              
             
            
           
          
          
           
            
             
              
               
                
                
                 
                  
                   
                  
                 
                
               
              
             
             
              
               
                
                
                
               
              
             
            
           
          
         
        
       
       
        
         
          
           
            
             
              
               
                
                 
                  
                   
                  
                 
                
                
                
                 
                  
                   
                    
                     
                      
                      
                     
                    
                   
                  
                 
                
                
                 
                  
                   
                   
                    
                     
                      
                       
                      
                     
                    
                   
                  
                 
                
                
                 
                  
                   
                   
                    
                     
                      
                       
                        
                       
                      
                     
                    
                   
                  
                 
                
                
                
                 
                  
                   
                   
                   
                  
                 
                
                
               
              
             
            
           
          
         
        
       
       
        
         
          
           
            
             
              
               
                
                
                
                
                
                
                
               
              
             
            
           
          
          
         
        
       
       
        
         
         
         
         
        
       
       
        
         
         
        
       
      
     
    
    
     
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
     
    
   
  
 

 

and below is the procedure

ALter PROCEDURE MoserBaer_GetConsolidatedData_ForInvoice 
 
AS
BEGIN
 
 SET NOCOUNT ON;

  
 SELECT * from T_Invoice for XMl auto--,XMLDATA
END
GO

So please asdvise mehow can i do this…..

If your query in the SP returns 4 records  you will get a repeating  records. My question is that IS your query correct and should it return all 4 records? If yes then you have to debatch the records inside your orchestration and create 4 invoice  messages