January 24, 2017 at 9:00 am
Hi,
γI want the TaskName field to show Hierarchy in the order with further indentation of the child .
+ SuperTask
-- SubTask
----ChildTasks
CREATE TABLE #ParentChildHierarchy
(
SuperTaskID NVARCHAR (20),
TaskID NVARCHAR (20),
ChildID NVARCHAR (20),
TaskName NVARCHAR (4000),
TaskStart DATETIME,
TaskEnd DATETIME
)
INSERT INTO #ParentChildHierarchy (SuperTaskID , TaskID , ChildID , TaskName , TaskStart , TaskEnd )
--ParentTasks
SELECT 'IEA6IKQDVRK6M','IEA6IKQDVRK6M',NULL,'+ DP Alpha release',NULL,'2017-01-06 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5N','IEA6IKQDVRK5N',NULL,'+ DP Committee Gate Final Gate','2016-08-01 09:00:00.000','2018-04-05 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5N','IEA6IKQDVRK55',NULL,'--Handover Day','2016-11-15 09:00:00.000','2016-11-15 17:00:00.000'
--SubTasks
UNION
SELECT 'IEA6IKQDVRK5N','IEA6IKQDVRK5P','IEA6IKQDVRK52','--Governance Committee','2017-01-05 09:00:00.000','2018-01-08 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5N','IEA6IKQDVRK5P','IEA6IKQDVRK5S','--Governance Committee','2017-01-05 09:00:00.000','2018-01-08 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5N','IEA6IKQDVRK5P','IEA6IKQDVRL3S','--Governance Committee','2017-01-05 09:00:00.000','2018-01-08 17:00:00.000'
---Childs
UNION
SELECT 'IEA6IKQDVRK5P','IEA6IKQDVRK52',NULL,'--Agree major changes in scope etc','2016-11-04 09:00:00.000','2017-10-31 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5P','IEA6IKQDVRK5S',NULL,'--Continue with team','2016-11-04 09:00:00.000','2017-10-31 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5P','IEA6IKQDVRL3S',NULL,'--Progress goals','2016-11-04 09:00:00.000','2017-10-31 17:00:00.000'
SELECT * FROM #ParentChildHierarchy
--Desired results
SELECT 'IEA6IKQDVRK6M' AS SuperTaskID,'IEA6IKQDVRK6M' AS TaskID,'+ DP Alpha release' AS TaskName,NULL AS TaskStart,'2017-01-06 17:00:00.000' AS TaskEnd
UNION
SELECT 'IEA6IKQDVRK5N' AS SuperTaskID,'IEA6IKQDVRK5N' AS TaskID,'+ DP Committee Gate Final Gate' AS TaskName,'2016-08-01 09:00:00.000' AS TaskStart,'2018-04-05 17:00:00.000' AS TaskEnd
UNION
SELECT 'IEA6IKQDVRK5N' AS SuperTaskID,'IEA6IKQDVRK5P' AS TaskID,'--Governance Committee' AS TaskName,'2017-01-05 09:00:00.000' AS TaskStart,'2018-01-08 17:00:00.000' AS TaskEnd
UNION
SELECT 'IEA6IKQDVRK5P' AS SuperTaskID,'IEA6IKQDVRK52' AS TaskID,'----Agree major changes in scope etc' AS TaskName,'2016-11-04 09:00:00.000' AS TaskStart,'2017-10-31 17:00:00.000' AS TaskEnd
UNION
SELECT 'IEA6IKQDVRK5P' AS SuperTaskID,'IEA6IKQDVRK5S' AS TaskID,'----Continue with team' AS TaskName,'2016-11-04 09:00:00.000' AS TaskStart,'2017-10-31 17:00:00.000' AS TaskEnd
UNION
SELECT 'IEA6IKQDVRK5P' AS SuperTaskID,'IEA6IKQDVRL3S' AS TaskID,'----Progress goals' AS TaskName,'2016-11-04 09:00:00.000' AS TaskStart,'2017-10-31 17:00:00.000' AS TaskEnd
DROP TABLE #ParentChildHierarchy
γThanks,
PSB
January 25, 2017 at 5:14 am
Can anyone please help ?
January 25, 2017 at 8:07 am
Think a recursive cte would help here
Take a look at something like (which also handles indentation) : http://sqlblog.com/blogs/john_paul_cook/archive/2009/10/03/displaying-hierarchical-data-indenting-the-output.aspx
- Damian
January 25, 2017 at 8:14 am
PSB - Wednesday, January 25, 2017 5:14 AMCan anyone please help ?
Yes. I'll be back in about 15 minutes. The problem with this hierarchy is that someone denormalized it because they thought it would be easier. As a result, they have "loops" built into it and a whole lot of unnecessary duplication. It would have been much better if the maintained it as a more simple "Adjacency List" where each node is only "aware" of its parent. It turns out that what's being called a "ChildID" in this table is virtually useless.
And God help you if they ever see the need to add another level. π
--Jeff Moden
Change is inevitable... Change for the better is not.
January 25, 2017 at 8:34 am
Here's the solution you asked for. It also correctly places the "Handover Day". The correct solution would be to turn the table into a true Adjacency List for ease of maintenance and update it for Nested Sets traversals for performance. Please see the article at the following link for that.
http://www.sqlservercentral.com/articles/Hierarchy/94040/
WITH cteTraverse AS
( --=== Find the root nodes and start the "SortPath".
SELECT SuperTaskID
,TaskID
,TaskName = SUBSTRING(TaskName,3,4000)
,TaskStart
,TaskEnd
,hLevel = 0 --We will use this to determine "indentation"
,SortPath = CONVERT(VARCHAR(8000),'|' + SuperTaskID + '|')
FROM #ParentChildHierarchy
WHERE SuperTaskID = TaskID
UNION ALL
--=== Traverse the hierarchy and build the outputs as we go.
-- This is the "recursive" part of this rCTE (Recursive CTE).
SELECT tbl.SuperTaskID
,tbl.TaskID
,TaskName = SUBSTRING(tbl.TaskName,3,4000)
,tbl.TaskStart
,tbl.TaskEnd
,hLevel = cte.hLevel + 1
,SortPath = CONVERT(VARCHAR(8000),cte.SortPath + tbl.TaskID + '|')
FROM cteTraverse cte
JOIN #ParentChildHierarchy tbl ON tbl.SuperTaskID = cte.TaskID
WHERE cte.SortPath NOT LIKE '%|' + tbl.TaskID + '|%' /*This breaks the "loops" built into the hierarchy*/
) --=== Produce the sorted, indented output
SELECT DISTINCT /*The DISTINCT is necessary to get rid of the duplication*/
SuperTaskID
,TaskID
,TaskName = CASE
WHEN hLevel = 0 THEN '+ ' + TaskName
ELSE REPLICATE('--',hLevel) + TaskName
END
,TaskStart
,TaskEnd
,hLevel -- Comment out if you do not want to see this.
,SortPath -- Comment out if you do not want to see this.
FROM cteTraverse t
ORDER BY t.SortPath
;
--Jeff Moden
Change is inevitable... Change for the better is not.
January 25, 2017 at 8:45 am
Jeff Moden - Wednesday, January 25, 2017 8:34 AMHere's the solution you asked for. It also correctly places the "Handover Day". The correct solution would be to turn the table into a true Adjacency List for ease of maintenance and update it for Nested Sets traversals for performance. Please see the article at the following link for that.
http://www.sqlservercentral.com/articles/Hierarchy/94040/
WITH cteTraverse AS
( --=== Find the root nodes and start the "SortPath".
SELECT SuperTaskID
,TaskID
,TaskName = SUBSTRING(TaskName,3,4000)
,TaskStart
,TaskEnd
,hLevel = 0 --We will use this to determine "indentation"
,SortPath = CONVERT(VARCHAR(8000),'|' + SuperTaskID + '|')
FROM #ParentChildHierarchy
WHERE SuperTaskID = TaskID
UNION ALL
--=== Traverse the hierarchy and build the outputs as we go.
-- This is the "recursive" part of this rCTE (Recursive CTE).
SELECT tbl.SuperTaskID
,tbl.TaskID
,TaskName = SUBSTRING(tbl.TaskName,3,4000)
,tbl.TaskStart
,tbl.TaskEnd
,hLevel = cte.hLevel + 1
,SortPath = CONVERT(VARCHAR(8000),cte.SortPath + tbl.TaskID + '|')
FROM cteTraverse cte
JOIN #ParentChildHierarchy tbl ON tbl.SuperTaskID = cte.TaskID
WHERE cte.SortPath NOT LIKE '%|' + tbl.TaskID + '|%' /*This breaks the "loops" built into the hierarchy*/
) --=== Produce the sorted, indented output
SELECT DISTINCT /*The DISTINCT is necessary to get rid of the duplication*/
SuperTaskID
,TaskID
,TaskName = CASE
WHEN hLevel = 0 THEN '+ ' + TaskName
ELSE REPLICATE('--',hLevel) + TaskName
END
,TaskStart
,TaskEnd
,hLevel -- Comment out if you do not want to see this.
,SortPath -- Comment out if you do not want to see this.
FROM cteTraverse t
ORDER BY t.SortPath
;
Thanks but the code doesn't return any result set.
January 25, 2017 at 8:46 am
Jeff Moden - Wednesday, January 25, 2017 8:14 AMPSB - Wednesday, January 25, 2017 5:14 AMCan anyone please help ?Yes. I'll be back in about 15 minutes. The problem with this hierarchy is that someone denormalized it because they thought it would be easier. As a result, they have "loops" built into it and a whole lot of unnecessary duplication. It would have been much better if the maintained it as a more simple "Adjacency List" where each node is only "aware" of its parent. It turns out that what's being called a "ChildID" in this table is virtually useless.
And God help you if they ever see the need to add another level. π
Yes, You are right . There is no child ids in the original table . But I do have SuperTaskID,SubTaskID and TaskIDs
CREATE TABLE #ParentChildHierarchy
(
SuperTaskID NVARCHAR (20),
TaskID NVARCHAR (20),
SubTaskID NVARCHAR (20),
TaskName NVARCHAR (4000),
TaskStart DATETIME,
TaskEnd DATETIME
)
INSERT INTO #ParentChildHierarchy (SuperTaskID , TaskID , SubTaskID , TaskName , TaskStart , TaskEnd )
--ParentTasks
SELECT NULL, 'IEA6IKQDVRK6M', NULL, 'DP Alpha release', NULL, '2017-01-06 17:00:00.000'
UNION
--SubTasks
SELECT NULL, 'IEA6IKQDVRK5N', 'IEA6IKQDVRK5P','DP Committee Gate Final Gate', '2016-08-01 09:00:00.000', '2018-04-05 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5N', 'IEA6IKQDVRK55', NULL, 'Handover Day', '2016-11-15 09:00:00.000', '2016-11-15 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5N','IEA6IKQDVRK5P','IEA6IKQDVRK52','Governance Committee','2017-01-05 09:00:00.000','2018-01-08 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5N','IEA6IKQDVRK5P','IEA6IKQDVRK5S','Governance Committee','2017-01-05 09:00:00.000','2018-01-08 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5N','IEA6IKQDVRK5P','IEA6IKQDVRK3S','Governance Committee','2017-01-05 09:00:00.000','2018-01-08 17:00:00.000'
---Childs
UNION
SELECT 'IEA6IKQDVRK5P', 'IEA6IKQDVRK52' ,NULL,'Agree major changes in scope etc', '2016-11-04 09:00:00.000', '2017-10-31 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5P', 'IEA6IKQDVRK5S', NULL,'Continue with team', '2016-11-04 09:00:00.000', '2017-10-31 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5P', 'IEA6IKQDVRL3S', NULL ,'Progress goals', '2016-11-04 09:00:00.000', '2017-10-31 17:00:00.000'
I want to see something like this .
--Desired goals
'+ DP Alpha release'
'+ DP Committee Gate Final Gate'
'-->Governance Committee'
'-------->Agree major changes in scope etc'
'-------->Continue with team'
'-------->Progress goals'
'-->Handover Day'
January 25, 2017 at 9:54 am
Jeff Moden - Wednesday, January 25, 2017 8:34 AMHere's the solution you asked for. It also correctly places the "Handover Day". The correct solution would be to turn the table into a true Adjacency List for ease of maintenance and update it for Nested Sets traversals for performance. Please see the article at the following link for that.
http://www.sqlservercentral.com/articles/Hierarchy/94040/
WITH cteTraverse AS
( --=== Find the root nodes and start the "SortPath".
SELECT SuperTaskID
,TaskID
,TaskName = SUBSTRING(TaskName,3,4000)
,TaskStart
,TaskEnd
,hLevel = 0 --We will use this to determine "indentation"
,SortPath = CONVERT(VARCHAR(8000),'|' + SuperTaskID + '|')
FROM #ParentChildHierarchy
WHERE SuperTaskID = TaskID
UNION ALL
--=== Traverse the hierarchy and build the outputs as we go.
-- This is the "recursive" part of this rCTE (Recursive CTE).
SELECT tbl.SuperTaskID
,tbl.TaskID
,TaskName = SUBSTRING(tbl.TaskName,3,4000)
,tbl.TaskStart
,tbl.TaskEnd
,hLevel = cte.hLevel + 1
,SortPath = CONVERT(VARCHAR(8000),cte.SortPath + tbl.TaskID + '|')
FROM cteTraverse cte
JOIN #ParentChildHierarchy tbl ON tbl.SuperTaskID = cte.TaskID
WHERE cte.SortPath NOT LIKE '%|' + tbl.TaskID + '|%' /*This breaks the "loops" built into the hierarchy*/
) --=== Produce the sorted, indented output
SELECT DISTINCT /*The DISTINCT is necessary to get rid of the duplication*/
SuperTaskID
,TaskID
,TaskName = CASE
WHEN hLevel = 0 THEN '+ ' + TaskName
ELSE REPLICATE('--',hLevel) + TaskName
END
,TaskStart
,TaskEnd
,hLevel -- Comment out if you do not want to see this.
,SortPath -- Comment out if you do not want to see this.
FROM cteTraverse t
ORDER BY t.SortPath
;
PSB - Wednesday, January 25, 2017 8:45 AMThanks but the code doesn't return any result set.
SuperTaskID TaskID TaskName TaskStart TaskEnd hLevel SortPath
------------- ------------- ------------------------------------ ----------------------- ----------------------- ------ -------------------------------------------
IEA6IKQDVRK5N IEA6IKQDVRK5N + DP Committee Gate Final Gate 2016-08-01 09:00:00.000 2018-04-05 17:00:00.000 0 |IEA6IKQDVRK5N|
IEA6IKQDVRK5N IEA6IKQDVRK55 --Handover Day 2016-11-15 09:00:00.000 2016-11-15 17:00:00.000 1 |IEA6IKQDVRK5N|IEA6IKQDVRK55|
IEA6IKQDVRK5N IEA6IKQDVRK5P --Governance Committee 2017-01-05 09:00:00.000 2018-01-08 17:00:00.000 1 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|
IEA6IKQDVRK5P IEA6IKQDVRK52 ----Agree major changes in scope etc 2016-11-04 09:00:00.000 2017-10-31 17:00:00.000 2 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|IEA6IKQDVRK52|
IEA6IKQDVRK5P IEA6IKQDVRK5S ----Continue with team 2016-11-04 09:00:00.000 2017-10-31 17:00:00.000 2 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|IEA6IKQDVRK5S|
IEA6IKQDVRK5P IEA6IKQDVRL3S ----Progress goals 2016-11-04 09:00:00.000 2017-10-31 17:00:00.000 2 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|IEA6IKQDVRL3S|
IEA6IKQDVRK6M IEA6IKQDVRK6M + DP Alpha release NULL 2017-01-06 17:00:00.000 0 |IEA6IKQDVRK6M|
--Jeff Moden
Change is inevitable... Change for the better is not.
January 25, 2017 at 10:18 am
Jeff Moden - Wednesday, January 25, 2017 9:54 AMJeff Moden - Wednesday, January 25, 2017 8:34 AMHere's the solution you asked for. It also correctly places the "Handover Day". The correct solution would be to turn the table into a true Adjacency List for ease of maintenance and update it for Nested Sets traversals for performance. Please see the article at the following link for that.
http://www.sqlservercentral.com/articles/Hierarchy/94040/
WITH cteTraverse AS
( --=== Find the root nodes and start the "SortPath".
SELECT SuperTaskID
,TaskID
,TaskName = SUBSTRING(TaskName,3,4000)
,TaskStart
,TaskEnd
,hLevel = 0 --We will use this to determine "indentation"
,SortPath = CONVERT(VARCHAR(8000),'|' + SuperTaskID + '|')
FROM #ParentChildHierarchy
WHERE SuperTaskID = TaskID
UNION ALL
--=== Traverse the hierarchy and build the outputs as we go.
-- This is the "recursive" part of this rCTE (Recursive CTE).
SELECT tbl.SuperTaskID
,tbl.TaskID
,TaskName = SUBSTRING(tbl.TaskName,3,4000)
,tbl.TaskStart
,tbl.TaskEnd
,hLevel = cte.hLevel + 1
,SortPath = CONVERT(VARCHAR(8000),cte.SortPath + tbl.TaskID + '|')
FROM cteTraverse cte
JOIN #ParentChildHierarchy tbl ON tbl.SuperTaskID = cte.TaskID
WHERE cte.SortPath NOT LIKE '%|' + tbl.TaskID + '|%' /*This breaks the "loops" built into the hierarchy*/
) --=== Produce the sorted, indented output
SELECT DISTINCT /*The DISTINCT is necessary to get rid of the duplication*/
SuperTaskID
,TaskID
,TaskName = CASE
WHEN hLevel = 0 THEN '+ ' + TaskName
ELSE REPLICATE('--',hLevel) + TaskName
END
,TaskStart
,TaskEnd
,hLevel -- Comment out if you do not want to see this.
,SortPath -- Comment out if you do not want to see this.
FROM cteTraverse t
ORDER BY t.SortPath
;PSB - Wednesday, January 25, 2017 8:45 AMThanks but the code doesn't return any result set.Then you have something wrong with the data that you just tested with. I used the test data that you posted and got the exact return you wanted. Check the content of the test table you built. I get the following from the code using the test data you posted in your original post.
SuperTaskID TaskID TaskName TaskStart TaskEnd hLevel SortPath
------------- ------------- ------------------------------------ ----------------------- ----------------------- ------ -------------------------------------------
IEA6IKQDVRK5N IEA6IKQDVRK5N + DP Committee Gate Final Gate 2016-08-01 09:00:00.000 2018-04-05 17:00:00.000 0 |IEA6IKQDVRK5N|
IEA6IKQDVRK5N IEA6IKQDVRK55 --Handover Day 2016-11-15 09:00:00.000 2016-11-15 17:00:00.000 1 |IEA6IKQDVRK5N|IEA6IKQDVRK55|
IEA6IKQDVRK5N IEA6IKQDVRK5P --Governance Committee 2017-01-05 09:00:00.000 2018-01-08 17:00:00.000 1 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|
IEA6IKQDVRK5P IEA6IKQDVRK52 ----Agree major changes in scope etc 2016-11-04 09:00:00.000 2017-10-31 17:00:00.000 2 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|IEA6IKQDVRK52|
IEA6IKQDVRK5P IEA6IKQDVRK5S ----Continue with team 2016-11-04 09:00:00.000 2017-10-31 17:00:00.000 2 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|IEA6IKQDVRK5S|
IEA6IKQDVRK5P IEA6IKQDVRL3S ----Progress goals 2016-11-04 09:00:00.000 2017-10-31 17:00:00.000 2 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|IEA6IKQDVRL3S|
IEA6IKQDVRK6M IEA6IKQDVRK6M + DP Alpha release NULL 2017-01-06 17:00:00.000 0 |IEA6IKQDVRK6M|(7 row(s) affected)
I see that you aren't using the ChildId or SubTaskID at all . But there is a slight modification .. The SuperTaskID s for the topmost are null . If I make that change your query does not return results .
CREATE TABLE #ParentChildHierarchy
(
SuperTaskID NVARCHAR (20),
TaskID NVARCHAR (20),
SubTaskID NVARCHAR (20),
TaskName NVARCHAR (4000),
TaskStart DATETIME,
TaskEnd DATETIME
)
INSERT INTO #ParentChildHierarchy (SuperTaskID , TaskID , SubTaskID , TaskName , TaskStart , TaskEnd )
--ParentTasks
SELECT NULL, 'IEA6IKQDVRK6M', NULL, '+ DP Alpha release', NULL, '2017-01-06 17:00:00.000'
UNION
SELECT NULL, 'IEA6IKQDVRK5N', NULL ,'+ DP Committee Gate Final Gate', '2016-08-01 09:00:00.000', '2018-04-05 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5N', 'IEA6IKQDVRK55', NULL, '--Handover Day', '2016-11-15 09:00:00.000', '2016-11-15 17:00:00.000'
--SubTasks
UNION
SELECT 'IEA6IKQDVRK5N', 'IEA6IKQDVRK5P', 'IEA6IKQDVRK52' ,'--Governance Committee', '2017-01-05 09:00:00.000', '2018-01-08 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5N', 'IEA6IKQDVRK5P', 'IEA6IKQDVRK5S' ,'--Governance Committee', '2017-01-05 09:00:00.000', '2018-01-08 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5N', 'IEA6IKQDVRK5P', 'IEA6IKQDVRL3S' ,'--Governance Committee', '2017-01-05 09:00:00.000', '2018-01-08 17:00:00.000'
---Childs
UNION
SELECT 'IEA6IKQDVRK5P', 'IEA6IKQDVRK52', NULL ,'--Agree major changes in scope etc', '2016-11-04 09:00:00.000', '2017-10-31 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5P', 'IEA6IKQDVRK5S', NULL ,'--Continue with team', '2016-11-04 09:00:00.000', '2017-10-31 17:00:00.000'
UNION
SELECT 'IEA6IKQDVRK5P', 'IEA6IKQDVRL3S', NULL ,'--Progress goals', '2016-11-04 09:00:00.000', '2017-10-31 17:00:00.000'
SELECT * FROM #ParentChildHierarchy
January 25, 2017 at 10:53 am
Please help with the modifications to SuperTAskID null if parent . I am stuck . π
January 25, 2017 at 11:32 am
PSB - Wednesday, January 25, 2017 10:53 AMPlease help with the modifications to SuperTAskID null if parent . I am stuck . π
Not sure what you are talking about. Can you modify the results Jeff posted to show what you are expecting?
January 25, 2017 at 12:31 pm
Lynn Pettis - Wednesday, January 25, 2017 11:32 AMPSB - Wednesday, January 25, 2017 10:53 AMPlease help with the modifications to SuperTAskID null if parent . I am stuck . πNot sure what you are talking about. Can you modify the results Jeff posted to show what you are expecting?
Basically the same result as Jeff posted but considering NULL SuperTAskID for + DP Alpha release and + DP Committee Gate Final Gate as these are the parents
SuperTaskID TaskID TaskName TaskStart TaskEnd hLevel SortPath
------------- ------------- ------------------------------------ ----------------------- ----------------------- ------ -------------------------------------------
NULL IEA6IKQDVRK5N + DP Committee Gate Final Gate 2016-08-01 09:00:00.000 2018-04-05 17:00:00.000 0 |IEA6IKQDVRK5N|
IEA6IKQDVRK5N IEA6IKQDVRK55 --Handover Day 2016-11-15 09:00:00.000 2016-11-15 17:00:00.000 1 |IEA6IKQDVRK5N|IEA6IKQDVRK55|
IEA6IKQDVRK5N IEA6IKQDVRK5P --Governance Committee 2017-01-05 09:00:00.000 2018-01-08 17:00:00.000 1 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|
IEA6IKQDVRK5P IEA6IKQDVRK52 ----Agree major changes in scope etc 2016-11-04 09:00:00.000 2017-10-31 17:00:00.000 2 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|IEA6IKQDVRK52|
IEA6IKQDVRK5P IEA6IKQDVRK5S ----Continue with team 2016-11-04 09:00:00.000 2017-10-31 17:00:00.000 2 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|IEA6IKQDVRK5S|
IEA6IKQDVRK5P IEA6IKQDVRL3S ----Progress goals 2016-11-04 09:00:00.000 2017-10-31 17:00:00.000 2 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|IEA6IKQDVRL3S|
NULL IEA6IKQDVRK6M + DP Alpha release NULL
January 25, 2017 at 2:33 pm
PSB - Wednesday, January 25, 2017 12:31 PMLynn Pettis - Wednesday, January 25, 2017 11:32 AMPSB - Wednesday, January 25, 2017 10:53 AMPlease help with the modifications to SuperTAskID null if parent . I am stuck . πNot sure what you are talking about. Can you modify the results Jeff posted to show what you are expecting?
Basically the same result as Jeff posted but considering NULL SuperTAskID for + DP Alpha release and + DP Committee Gate Final Gate as these are the parents
SuperTaskID TaskID TaskName TaskStart TaskEnd hLevel SortPath
------------- ------------- ------------------------------------ ----------------------- ----------------------- ------ -------------------------------------------
NULL IEA6IKQDVRK5N + DP Committee Gate Final Gate 2016-08-01 09:00:00.000 2018-04-05 17:00:00.000 0 |IEA6IKQDVRK5N|
IEA6IKQDVRK5N IEA6IKQDVRK55 --Handover Day 2016-11-15 09:00:00.000 2016-11-15 17:00:00.000 1 |IEA6IKQDVRK5N|IEA6IKQDVRK55|
IEA6IKQDVRK5N IEA6IKQDVRK5P --Governance Committee 2017-01-05 09:00:00.000 2018-01-08 17:00:00.000 1 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|
IEA6IKQDVRK5P IEA6IKQDVRK52 ----Agree major changes in scope etc 2016-11-04 09:00:00.000 2017-10-31 17:00:00.000 2 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|IEA6IKQDVRK52|
IEA6IKQDVRK5P IEA6IKQDVRK5S ----Continue with team 2016-11-04 09:00:00.000 2017-10-31 17:00:00.000 2 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|IEA6IKQDVRK5S|
IEA6IKQDVRK5P IEA6IKQDVRL3S ----Progress goals 2016-11-04 09:00:00.000 2017-10-31 17:00:00.000 2 |IEA6IKQDVRK5N|IEA6IKQDVRK5P|IEA6IKQDVRL3S|
NULL IEA6IKQDVRK6M + DP Alpha release NULL
So, to paraphrase, where SuperTaskID = TaskID SuperTaskID should display null instead of SuperTaskID. That about sum it up?
January 25, 2017 at 4:16 pm
PSB - Wednesday, January 25, 2017 10:53 AMPlease help with the modifications to SuperTAskID null if parent . I am stuck . π
Is the test data and the results you want complete and accurate this time?
--Jeff Moden
Change is inevitable... Change for the better is not.
January 25, 2017 at 4:54 pm
Jeff Moden - Wednesday, January 25, 2017 4:16 PMPSB - Wednesday, January 25, 2017 10:53 AMPlease help with the modifications to SuperTAskID null if parent . I am stuck . πIs the test data and the results you want complete and accurate this time?
yes . It's correct .
Viewing 15 posts - 1 through 15 (of 21 total)
You must be logged in to reply to this topic. Login to reply