Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7897813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:15:52+00:00 2026-06-03T08:15:52+00:00

I have a long SQL Script which I run to pre-populate some temp tables.

  • 0

I have a long SQL Script which I run to pre-populate some temp tables. At the bottom of the script, I have some queries that I run manually, as well as some other ad-hoc queries. I open the query, then get it started (takes a few minutes to run). However, I don’t want all the queries at the end of script to run – I only want to the temp tables to populate.

SQL Server 2008 Management Studio has a “breakpoint” function that will stop the script at that point, but if you close the application and re-open it, it will forget the breakpoint (only lasts for the session in which you set it).

I could comment out the queries at the bottom and run them manually. However, the ideal solution for me was to include a command in my script to stop the script from running.

In SQL Server 2008 is there a command I can put into my script that will stop processing at a specific location?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:15:54+00:00Added an answer on June 3, 2026 at 8:15 am

    Just put a RETURN at the place where you want to stop executing the script.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a SQL script that will insert a long string into a table.
I have a pretty long SQL query that I use to, for all of
I have a 5800+ line SQL Server scripts that handles long, intricate calculations that
I'm looking for a script or application that tidies up and reformats SQL queries.
Hi all I have the following SQL Server 2008 script that will check if
I have a script that I've been using for a some time to easily
I have a very long T-sql script, it is a single batch, something like
One thing with which I have long had problems, within the CakePHP framework, is
I have a long URL on a web page in Windows that I need
I have several *.sql files with script to create table and sprocs for a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.