troubleshooting Question

Cursor SQL 2012

Avatar of steven
stevenFlag for United States of America asked on
Microsoft SQL Server 2008
4 Comments1 Solution83 ViewsLast Modified:
We are currently load data to tables from a spread sheet.  The first table to load the "master"  is a one to many relationship.  To start we have a cursor that grabs the items to load.  IT then loads the master table inside of that cursor is another that pulls the many columns to populate using the ITEM from the outside cursor.  The inside cursor only runs one time and exits?  We pass it the item value from the outter cursor, the inside cursor pulls 8 values, for the ONE item value, but it will only load the first pass and exit.  

I am not real good with sql, so why doesn't it run the full eight times and then exit.  (Some will have as little as five runs)
BomInsert.sql
ASKER CERTIFIED SOLUTION
Arifhusen Ansari
Business Intelligence Developer and Analyst

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Top Expert 2015

The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros