Forum Replies Created

Viewing 15 posts - 106 through 120 (of 1,114 total)

  • RE: Single row to multiple columns

    yup. The below query worked fine.

    create table W

    (

    ID int,

    acc_no varchar(5),

    val varchar(255)

    )

    insert into W

    select 100,'a1','D,20987987.5%,,A account is being linked to B account'

    union all

    select 100,'a2','D,20987987.5%,,A account is being linked to B...

  • RE: Single row to multiple columns

    hey Jeff...

    Actually we are using both the version. i.e. 2005 and 2000. moreover the logic needs to be implemented in both the server. Thats why i asked for 2000 too....

  • RE: Single row to multiple columns

    yes. the requirement got changed little bit yesterday night. the business user wants to add some more column in the report.

    yes, say for example we GROUPED or generated numbers based...

  • RE: Single row to multiple columns

    yeah..i have also tried the same...Thanks a lot for all your help.

    is there any way to achieve my requirement without using temporary table/IDENTITY/ROW_NUMBER?

  • RE: Single row to multiple columns

    is there any way to generate the sequencte number without using ROWNUMBER() or CREATE TABLE WITH IDENTITY on the fly?

    I can use something like below

    select no from

    (select 1...

  • RE: Single row to multiple columns

    i got it...i have to use the same query in Sql2000 too..:(

    we used ROWNUMBER()...

  • RE: Single row to multiple columns

    Tally with GROUP BY ...?

    i am not getting you...

  • RE: Single row to multiple columns

    Yeah..Thats correct..and good catch...

    But the requirement is to do this against the table data instead of input parameter

    ..

  • RE: Single row to multiple columns

    I just came to know i need to implement the same against a table data.

    CREATE TABLE W

    (

    ID INT,

    val varchar(255)

    )

    insert into W

    select 100, 'D,20.5%,10.25%,A account is being linked to B account'

    union

    select...

  • RE: Single row to multiple columns

    I DID SOMETHING LIKE BELOW....

    declare @_sPlatform varchar(1024)

    select @_sPlatform = 'D,20987987.5%,10.25876767868%,A account is being linked to B account'

    declare @t1 varchar(255), @start_pos int

    declare @t2 varchar(255)...

  • RE: Single row to multiple columns

    ...the position of comma may vary..

    say for example...

    D,20.5454545454%,178780.2323225%,A account is being linked to B account'

  • RE: Single row to multiple columns

    SET ???

  • RE: Single row to multiple columns

    DECLARE @Parameter VARCHAR(255)

    SELECT @Parameter = ',' + 'D,20.5%,10.25%,A account is being linked to B account'+ ','

    SELECT SUBSTRING(@Parameter,N+1,CHARINDEX(',',@Parameter,N+1)-N-1)

    FROM dbo.Tally WHERE N < LEN(@Parameter) AND...

  • RE: Single row to multiple columns

    I never mistake your words..you said the right things..actually..i also suggest the same to other posters..

    i just receive only one value through input parameter which i posted in my question.

    declare...

  • RE: Applying Precedence Rule

    Hey..Mark..I'm sorry..

    Both the query is working fine. I appreciate you guys help...

Viewing 15 posts - 106 through 120 (of 1,114 total)