Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Help on sql query

Author  Topic 

naimish
Starting Member

1 Post

Posted - 2013-04-16 : 22:30:10
Hi all,

I got stuck in one of the customer requirement and need you all's help.

The requirement is below.

We have a ProjectPools and against any pool selection, we show list of projects and their child projects (if child projects too fall under same pool) .

But some child projects falls under different projectpool so they do not show up. Now we need to show that child projects too irrespective whether they are in same pool or different.

Please let me know if anyone wanted more detail clarification.

Project Pool - poolId

TopPool - 000100k (it has all projects)

pool1 - 000100k01

project1

project2

pool2 - 000100k02

project3

ChildProject3.1

ChildProject3.2

pool3 - 000100k03

project4

ChildProject3.3

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-04-17 : 00:26:13
Can you post sample input data and also expected output... and explain the logic

--
Chandu
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-04-17 : 00:53:56
how is the parent child relationship setup in the table? can you show column that contain parent child information?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -