Click to See Complete Forum and Search --> : Help:Generating Table hierarchy in sybase


cvg2mco
October 8th, 2005, 12:07 PM
Whats needed: A sql query or stored procedure that can generate a hierarchy for tables in a sybase database according to referential integrity constraints
What will it be used for: To truncate these tables in the proper order (without having to run trucates over and over again)

Additional information: Possible output of tables in the order
Parent_table|child1|child2|....... |child n
....
....


Also, the query should take into account that a child table can have more than one parent.

Any help in the above is greatly appreciated.
Thanks
-sunny