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.

 All Forums
 SQL Server 2005 Forums
 .NET Inside SQL Server (2005)
 SQL Procedure help separate the parsd column value

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 gridview
i have attached image for my table and o/p.

in the table paramlist column contails the likebelow
declare @vari varchar(max)='param=1;param=2;param=3;param=4;...param=20;param=21;'
Table1
itemname paramlist
-------------------------
item1 @vari
item2 @vari

Note: Param length might be vary based on each item (ex:item1 can have param upto 20 and item2 30)

o/p
item param1 param2 param3 param4 …
-------------------------------------------
item1 1 2 3 4 …
item2 11 22 null 44 …



GKRISH
   

- Advertisement -