Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)

  • RE: Query - Array

    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...

  • RE: Query - Array

    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...

  • RE: SQl Query

    it working fine.Thanks

  • RE: SQl Query

    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...

  • RE: SQl Query

    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 ...

Viewing 5 posts - 1 through 5 (of 5 total)