Yes, I keep forgetting about the availability of recursion in SQL Server 2005 and later. So far as I know, that's the only DB that supports such. Do you know of any other?
FWIW, the system I show works in Access and MySQL and Oracle, and of course SQL Server 2000. Even with Access, with a bit of cleverness in building the PATH value (not as simple as I thow there, that is), you can go 63 levels deep in a table with up to 16 million records. [Use MOD 64 encoding with no delimiters, so 4 bytes per level, so even 255 character limit in Access gets 63 levels. Easy to change to Unicode and get many more than that.]
|