I have a table named TagSchema which stored information that are flattened from an XML. The data in this table is stored per item. I have to get the data from this table and process it per item. I wrote a job that takes data from this table per item and processes them. But this is very inefficient as the job at a run can process data for only one item. How can I get the data from this column and process them without using a cursor or while loop?
The columns of the TagSchema table are unitId,widgetId,value and itemId. UnitId and widgetId are referencing another table. If these values are new I have to insert them to those referencing tables. Then I have to insert the value column data per item by calling a stored procedure. This sp accepts only one item at a time.
Above is my processing logic. With the current logic, records in TagSchema table reach millions easily as it takes a lot of time. Please advice a suitable logic I could use for