title: Handling multiple cursors in stored procedure
body: <p>I have two cursors (say CRSX1, CRSX2) in a stored procedure. It is like a nested while loop logic I need to implement. Can I use the second cursor CRSX2 while CRSX1 is open or do I have to close the first cursor before using second cursor.</p>
  
  <p>Or is there any other way around if we have to implement logic for double while loop in SQL Server</p>
  
  <p>Thanks in advance</p>