I want to generate a tree like structure where in the all<BR>the messages are stored in a single table and a message is<BR>realted to another message in the hierarchy.So I want to do<BR>this with a Single SQL statement.The structure of the table<BR>with sample data and the expected output from the Query are<BR>as follows:<BR><BR>MessageID ReplyTOID Message<BR>1 0 This is Question<BR>2 1 This is First Answer<BR>3 2 This is Answer to 2<BR>4 3 This is Answer to 3<BR>5 1 This is Answer to 1<BR><BR>OutPut<BR>Q. 1<BR>A. -2<BR>A. --3<BR>A. ---4<BR>A. -1 <BR>