After a quick search in Google, I found this nice page, describing a way to perform recursive queries for hierarchical data in SQL Server 2000 and 2005. So, for everyone interested, here's the link:
http://www.yafla.com/papers/sqlhierarchies/sqlhierarchies.htm