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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-10-22 : 22:44:55
|
rajkumar writes "Dear sir I Have a table in the following manner. ParentId 0 means It is the top most one. This table contains both the parents and therir childsStatus A--> Active B--> Deactive ---------------------------------------- Id Name ParentId Status---------------------------------------- 1 SAM 0 A 2 RAJ 1 A 3 KIM 0 D 4 FFF 3 A 5 KWS 0 A 4 FRD 5 D ----------------------------------------- I need a query Such that it gives all info about the ACTIVE parents and the corresponding ACTIVE Childs.I don't want to use any Union operators. I need a better Optimized query because this table can holds lakhs of records." |
|
|
|
|
|