Solved

Using Break in a nexted Query

Posted on 2014-02-18
4
160 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

632 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