Forum Replies Created

Viewing 15 posts - 16 through 30 (of 79 total)

  • RE: Select first grandchild row of first child

    Can you please explain the logic of your desired output,

    I am not getting what you want.

  • RE: Merging of rows

    Kingston Dhasian (4/13/2010)


    ; WITH cte_Schedule_Audit AS

    (

    SELECTROW_NUMBER() OVER( PARTITION BY ID, Action ORDER BY ID, ModifiedOn DESC ) RowNum, *

    FROM#Schedule_Audit

    )

    SELECTI.ID, I.M_ID, I.T_Name, I.T_Desc, I.Sch_Time, I.CreatedBy, I.CreatedOn, U.ModifiedBy, U.ModifiedOn,

    D.DeletedOn, D.DeletedBy

    FROMcte_Schedule_Audit I

    LEFT JOIN...

  • RE: Merging of rows

    ID M_ID T_Name T_Desc Sch_Time CreatedBy CreatedOn ModifiedBy ModifiedOn DeletedBy DeletedOn Action

    1 1 test1 testdesc 08:00 abc@xyz.com 2010-04-09 11:30:00.000 abc@xyz.com 2010-04-10 08:30:00.000 abc@xyz.com 2010-04-12 11:30:00.000

    2 1 test2 testdesc 08:00...

  • RE: Merging of rows

    @karthikeyan-2 : it is giving me only three rows as there are 4 ids and moreover giving only modifiedby and modifiedon

    I am sending required output in moments to make...

  • RE: Merging of rows

    I need only one row for each id

    your query is giving me entire table data

  • RE: Transaction Error

    Sorry I got the solution that was just a syntax error

    I have not given alias name A in table...

  • RE: Select Query

    Chris Morris-439714 (4/9/2010)


    vaibhav.tiwari (4/9/2010)


    Thanks ColdCoffee for your that much efforts your query is working fine and giving me expected output

    but i got the simpler solution from some another forum...

  • RE: Select Query

    COldCoffee (4/9/2010)


    Hey vaibhav...

    Tel me if this is the code u wnated

    ;WITH I_AND_U (ID)

    AS

    (

    SELECT

    DISTINCT s.ID

    FROM #Schedule_Audit s

    INNER JOIN

    ...

  • RE: Select Query

    And please call me vaibhav not sir 🙂

  • RE: Select Query

    COldCoffee (4/9/2010)


    Vaibhav, pls correct me if my understanding is wrong

    1. You need "I" rows that have atleast one "U" and present them.

    2. For any "I' row that dont have a...

  • RE: Select Query

    COldCoffee (4/9/2010)


    Vaibhav, can you give us some sample output rows inline with your sample data u have provided.. some visual representation of how your desired result set must be...

    Yeah...

  • RE: Select Query

    thats what i have done earlier but

    Note that for ID 2 there is not any entry with action 'U'

    so for that i need to show null.

  • RE: Data Insert

    This is clearly visible that any column 'Clusters' is identity column

    and you are trying to pass the value for that

    so you just select column names instead of *...

  • RE: CASE in the WHERE clause

    This can only be achieved by dynamic query...

    becasue your condition operator is not fix, as for one condition it is <= and for another it is =

    Case in...

  • RE: Help on strings

    Paul White NZ (4/6/2010)


    vaibhav.tiwari (4/6/2010)


    ...but for some procedure its showing invalid character length and i observed that there is not purpose line in that i need to return null value...

Viewing 15 posts - 16 through 30 (of 79 total)