Patent ID: 7065522

Claim:
A computer implemented method for extracting hierarchical data from one or more tables in a database, the method comprising: a. receiving user input identifying, at least, one or more tables in the database that contain the hierarchical data and a hierarchical structure of the hierarchical data; b. generating a Structured Query Language (SQL) statement using the user input received in step (a); c. presenting the SQL statement to the database for execution, wherein the SQL statement is generated from the user input by i. constructing object SQL statements executable to return all the database items identified by the user input; ii. constructing object SQL statements executable to calculate a level of an item in the hierarchical structure; iii. constructing object SQL statements executable to calculate a number of child items appendant to an item in the hierarchical structure; and, iv. combining the object SQL of steps (i) to (iii) to form a single object SQL statement; and, d. extracting the hierarchical data from the database in response to execution of the SQL statement.