tsql challenge 19#...

http://beyondrelational.com/blogs/tc/archive/2009/12/14/tsql-challenge-19-working-with-consolidated-calculations-on-hierarchical-structures.aspx#

it's almost done except i use function to get the accumulative value of downline members. i'm not sure if it's allowed.

judges r picky, they don't like temp table nor table variable, i assume they'd rule out function too.

anyway, it's very good challenge for your tsql. i just found it out last night and i love it immediately.

enjoy~~

所有跟帖: 

could use Node for the HierarchyID -HappyNow?!- 给 HappyNow?! 发送悄悄话 HappyNow?! 的博客首页 (154 bytes) () 12/15/2009 postreply 15:58:10

u think they intension is: the solution is suppose -撅着挺好- 给 撅着挺好 发送悄悄话 (57 bytes) () 12/15/2009 postreply 16:01:27

typo,i mean "i think....." -撅着挺好- 给 撅着挺好 发送悄悄话 (0 bytes) () 12/15/2009 postreply 16:03:51

"apply" doesn't like CTE, i'm out of idea... -撅着挺好- 给 撅着挺好 发送悄悄话 (37 bytes) () 12/15/2009 postreply 17:04:55

seems function is the only way i can go.... -撅着挺好- 给 撅着挺好 发送悄悄话 (0 bytes) () 12/15/2009 postreply 17:10:54

请您先登陆,再发跟帖!