Viewing 14 posts - 1 through 14 (of 14 total)
Thats it thanks heaps you got it working I appreciate that and you're help cheers dude
January 26, 2012 at 4:41 am
I want it to include 1/2/3/4 count = 0, 1/2/3/5/ count = 0, 1/2/3/6 count= 0, these are missing because there is no count fopr them but i need to...
January 26, 2012 at 4:25 am
this is what i got for a Count but it's misses some rows
put the following in the sored procedure at the bottom in place of the select statement
you'll notice that
1/2/3/4
1/2/3/5
1/2/3/6...
January 26, 2012 at 3:50 am
Can you use my other sample data i got it to work if you put a paramter '1' for some reason it didn't work with '3' so can you try...
January 26, 2012 at 3:35 am
It ended being the hyphen character being the problem so i use '/%' instead and it worked
January 26, 2012 at 3:25 am
you might need to change the select staement in the stored procedure from this
SELECT PostID, AddedBy, Title, ParentID, Path_String FROM Posts WHERE Path_String Like @threadID + '/%';
to this
SELECT...
January 26, 2012 at 3:22 am
I think this is all in correct order use EXEC sproc_GetPostsByThread '3'
select 3,'kirkdm', 'test', null, '3/' union all
select 5,'MikeDM', 're:test', 5, '3/5/' union all
select 8,'Jolene', 're:test', 5, '3/5/8' union all
select...
January 26, 2012 at 3:01 am
I've updated my post with the requested data + my sql stored procedure GetPostsThread
January 26, 2012 at 2:34 am
I tried you're second approach and i get no results if i put in 13, 12 or 1
January 25, 2012 at 5:16 pm
That still selects 1, 12, 13 etc if the parameter is just 1
January 25, 2012 at 5:11 pm
But doesn't HeirarchyId only have one root where posts have more than one root eg PostParentID = null then the children, I thought heirarchyId has one root
January 24, 2012 at 3:41 am
how do you create an index on ParentPostID im new to SQL so im just learning. What do i do
January 24, 2012 at 3:30 am
Thanks for you're quick response the reason why I asked is because I have a cte of posts and it checks if the parentId is null and loops through the...
January 23, 2012 at 3:20 pm
Yes thanks your code does work choice I would never of guessed it thanks heaps
July 9, 2010 at 4:10 am
Viewing 14 posts - 1 through 14 (of 14 total)