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  | 
                             
                            
                                    | 
                                         G_rose42 
                                        Starting Member 
                                         
                                        
                                        1 Post  | 
                                        
                                        
                                            
                                            
                                             Posted - 2014-09-13 : 11:21:24
                                            
  | 
                                             
                                            
                                            | I have facing some difficulties to build a SQL Query for my new requirement below is my table I have to list the items and paramlist in the gridviewi have attached image for my table and o/p.in the table paramlist column contails the likebelowdeclare @vari varchar(max)='param=1;param=2;param=3;param=4;...param=20;param=21;'Table1itemname       paramlist-------------------------item1          @variitem2          @variNote: Param length might be vary based on each item (ex:item1 can have param upto 20 and item2 30)o/pitem	param1	param2	param3	param4	…-------------------------------------------item1	1        2	3	4	…item2	11	22	null	44	…GKRISH | 
                                             
                                         
                                     | 
                             
       
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |