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 - 2002-07-08 : 08:40:57
|
Matt writes "I have a table that includes data as parents and childrens, it looks like this:ID PARENTID NAME-------------------1 0 NAME-A2 1 NAME-B3 2 NAME-C4 3 NAME-D5 4 NAME-E I want to select all the parent of a given id (i.e. if id = 5, I want to return NAME-A/NAME-B/NAME-C/NAME-D/NAME-E)Is it possible to do this in sql only???ThanksMatt" |
|
|
robvolk
Most Valuable Yak
15732 Posts |
|
|
|
|
|