prevost999
Programmer
I am attempting to write a stored procedure via SQL:
The problem is this:
I am using 12 table aliases(instances) of the same table to get my results, and it is really slowing down the processing time of the query.
Details:
In the table I am using there is a field called Item and a second field called SubItem. For the first item, there may be 5 sub-items, all 5 of which also have unique records in the table, so I have to tie the Sub-Item to the Item of the same table to get the details of the 2nd level. Because this chain can go as far as 12 levels, I have to create 12 table aliases to drill down to the level I want.
Question:
Is there any better way of doing this, so the performance time can be increased? Any help is appreciated.
The problem is this:
I am using 12 table aliases(instances) of the same table to get my results, and it is really slowing down the processing time of the query.
Details:
In the table I am using there is a field called Item and a second field called SubItem. For the first item, there may be 5 sub-items, all 5 of which also have unique records in the table, so I have to tie the Sub-Item to the Item of the same table to get the details of the 2nd level. Because this chain can go as far as 12 levels, I have to create 12 table aliases to drill down to the level I want.
Question:
Is there any better way of doing this, so the performance time can be increased? Any help is appreciated.