Solved

Using Break in a nexted Query

Posted on 2014-02-18
4
152 Views
Last Modified: 2014-02-23
Hi all
I have a while loop in a nexted query

1: Query do some proccessing.. Control checks
2: If the check is okay.. Get values..
3: Insert values until I have reach the maximum (Since I have break here.. My code stops)
4: clean up isolated transaction and write a report.

How can I continue to step 4, given that I am using the while loop  on step 3.

Thanks in Advance..

Sorry I am not a native speaker  :-)
0
Comment
Question by:ZURINET
  • 2
  • 2
4 Comments
 
LVL 35

Expert Comment

by:David Todd
ID: 39869560
Hi,

Are steps 1 - 4 in the loop, or just step 3?

Any chance of posting the code - its just that there are a number of different ways to test for the end of loop or continue in loop conditions, and without seeing your code I'm more likely to be wrong than right.

Regards
  David
0
 

Accepted Solution

by:
ZURINET earned 0 total points
ID: 39869619
sorry 
just solved it

 WHILE (@Flag < @counterCheck)
	 BEGIN								 
	
	-- SQL STATEMENT				
	SET @Flag		= @Flag	+ 1
	SET @PositionNr	= @PositionNr + 1								
	END		

Open in new window

0
 
LVL 35

Expert Comment

by:David Todd
ID: 39869673
Hi,

That's cool that you've solved it!

Regards
  David
0
 

Author Closing Comment

by:ZURINET
ID: 39880411
Just solved it
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now