>> I am looping through cursors in a sproc ... <<

Why? This means you are using SQL as if it were a 1950's Cobol program.
Since you did not post DDL, so that people have to guess what the
tables, keys, constraints, Declarative Referential Integrity, datatypes,
etc. in your schema are.

My unsupported guesses are that "curBOM" is a "Bill of Materials" table
for curses (one of the rules in the ISO-11179 standards is that you name
a data element for what it means in the data model, never for "how" or
"where" it is stored).

If this is so, look at the Nested sets or path enumeration models for
trees and hierarchies. They will run an order of magnitude or more
faster than this cursor.

Again, can I assume that "vwBillStructure" is the parts explosion for a
Volkswagen, as per ISO-11179 :)?

--CELKO--
===========================
Please post DDL, so that people do not have to guess what the keys,
constraints, Declarative Referential Integrity, datatypes, etc. in your
schema are.

*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!