Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Star
14460 Points
2402 Posts
Mar 02, 2012 07:31 AM|LINK
declare @table table ( Unique_Number varchar(100),R_date VARCHAR(100) ) INSERT INTO @table select 'GJ_1','1-Sep-11;9-Sep-11;' union all select 'GJ_2','10-Dec-11;12-Dec-11;' union all select 'GJ_3','9-Jan-12;' select Unique_Number,R_date,items As SplitedR_date From @table CROSS APPLY dbo.SplitString(R_date,';') --output --Unique_Number R_date SplitedR_date --GJ_1 1-Sep-11;9-Sep-11; 1-Sep-11 --GJ_1 1-Sep-11;9-Sep-11; 9-Sep-11 --GJ_2 10-Dec-11;12-Dec-11; 10-Dec-11 --GJ_2 10-Dec-11;12-Dec-11; 12-Dec-11 --GJ_3 9-Jan-12; 9-Jan-12
yrb.yogi
Star
14460 Points
2402 Posts
Re: Problem with Split Function in SQL...
Mar 02, 2012 07:31 AM|LINK
.Net All About