Viewing 15 posts - 16 through 30 (of 79 total)
Can you please explain the logic of your desired output,
I am not getting what you want.
April 17, 2010 at 3:13 am
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...
April 13, 2010 at 4:34 am
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...
April 13, 2010 at 4:22 am
@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...
April 13, 2010 at 4:16 am
I need only one row for each id
your query is giving me entire table data
April 13, 2010 at 4:02 am
Sorry I got the solution that was just a syntax error
I have not given alias name A in table...
April 10, 2010 at 6:13 am
Chris Morris-439714 (4/9/2010)
vaibhav.tiwari (4/9/2010)
but i got the simpler solution from some another forum...
April 9, 2010 at 7:32 am
COldCoffee (4/9/2010)
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
...
April 9, 2010 at 7:12 am
COldCoffee (4/9/2010)
1. You need "I" rows that have atleast one "U" and present them.
2. For any "I' row that dont have a...
April 9, 2010 at 6:07 am
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...
April 9, 2010 at 5:58 am
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.
April 9, 2010 at 5:47 am
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 *...
April 8, 2010 at 4:50 am
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...
April 8, 2010 at 4:46 am
Paul White NZ (4/6/2010)
vaibhav.tiwari (4/6/2010)
April 6, 2010 at 6:21 am
Viewing 15 posts - 16 through 30 (of 79 total)