Viewing 5 posts - 1 through 5 (of 5 total)
Thanks.I created a function for that.
Below is the function.
May be useful for someone in future.
ALTER FUNCTION dbo.Split
(
@RowData
nvarchar(2000),
@SplitOn
nvarchar(5),
@SplitNo
int
)
RETURNS
@RtnValue table
(
--Id int identity(1,1),
Data
nvarchar(100)
)
AS
BEGIN
Declare @Cnt int
Declare @SpCnt int
Declare @DataToRow nvarchar(2000)
Set @Cnt = 1
Set @SpCnt...
January 28, 2011 at 12:03 am
hi
Thanks for your function.
Your function will spilt single City.But i have to split some array of City
For Ex :
Table1 by 4
Addyston,Alexandria,Alpha,Amelia
Anderson,Arlington Heights,Augusta
Aurora,Avondale,Batavia,Batesville
Table1 by 3
Addyston,Alexandria,Alpha
Amelia,Anderson,Arlington Heights
Augusta,Aurora,Avondale
Batavia,Batesville
4,3 is my N
I have...
January 27, 2011 at 6:42 am
Hi
I got it. below is the query to do that using split functionlity.
Thanks for your DelimitedSplit8K function.
select field1 from table1 where field1 like '%Asset Protection Lead,Corporate%'
or table1 IN(SElect field1 from...
December 2, 2010 at 2:39 am
Hi
Thanks for your reply.
1. for your first question, yes 1,2,3,4,5 is record identifier
3. i can understand using this DelimitedSplit8k function i can split the values
like
Itemnumber ...
December 2, 2010 at 2:32 am
Viewing 5 posts - 1 through 5 (of 5 total)