Rank: Administration
Medals: Groups: Administrators
Joined: 3/22/2010 Posts: 10 Points: 45
Thanks: 0 times Was thanked: 1 time(s) in 1 post(s)
|
comma-separated ტექსტის კონვერტირება ცხრილის სახით XML-ის გამოყენებით BB კოდი:-- Version : SQL Server 2005,2008
declare @f varchar(1000)
-- მთელი რიცხვებისათვის set @f = '4,7,9,11,,47911,22,17,445'
select x.value('.','int') as value from (select convert(xml, '<ApexSample>'+replace(@f,',','</ApexSample><ApexSample>')+'</ApexSample>') as f ) t1 cross apply t1.f.nodes('ApexSample') r(x) -- ტექსტური მონაცემებისათვის set @f = 'ab4c,de7f,g9,hijk11,,abcdefgh47911ijk,xx,AB,CDE'
select x.value('.','nvarchar(100)') as value from (select convert(xml, '<ApexSample>'+replace(@f,',','</ApexSample><ApexSample>')+'</ApexSample>') as f ) t1 cross apply t1.f.nodes('ApexSample') r(x)
|
|
Apex ltd. http://www.apex.ge
|