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.
| Author |
Topic |
|
thiyagu_rind
Starting Member
46 Posts |
Posted - 2009-04-29 : 01:37:44
|
| hi,i have tables as parent and childrenparenttable(TableName)parentid parentname childid1 p1 42 p2 43 p3 5Childtable(TableName)childid childname4 x4 y4 z4 a5 bI just want find out the Parent which is have more than children.but here the 4 is the children for parentid 1 and 2. but i need to fetch only the parent id 1 because it is having more children.Please help without using the group by and having classRegardsThiyagarajan |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-04-29 : 01:55:23
|
quote: Please help without using the group by and having
Why ? KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
thiyagu_rind
Starting Member
46 Posts |
Posted - 2009-04-29 : 02:00:48
|
| ok, use group by also. bcoz my lead asked me to do without group by |
 |
|
|
aprichard
Yak Posting Veteran
62 Posts |
Posted - 2009-04-29 : 02:12:51
|
| Hi,According to table you posted,ChildID 4 is for ParentID 1 and 2, so, Both ParentID 1 and 2 having more than one records, since ChildID 4 having multiple Records.But you are saying that ParentID 1 only is having multiple child records.I am getting confusion on that. |
 |
|
|
|
|
|