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 7792499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T22:12:13+00:00 2026-06-01T22:12:13+00:00

It says that the command executed successfully but there are no values inserted into

  • 0

It says that the command executed successfully but there are no values inserted into the organization table.

DECLARE @now DATETIME
SET @now = GETDATE()
DECLARE @numtoinsert INT
SET @numtoinsert = 100

DECLARE @counter INT
SET @counter = 101
WHILE @counter < @numtoinsert
BEGIN
SET @counter = @counter + 1

INSERT INTO [MVServices].[dbo].[Organization]
       ([Organization_Id]
       ,[Business_Number]
       ,[Legal_Name]
       ,[Common_Name]
       ,[Operating_As]
       ,[Sort_Name]
       ,[Effective_Date]
       ,[Expiry_Date]
       ,[Created_By]
       ,[Created_Date]
       ,[Last_Changed_By]
       ,[Update_Date])
 VALUES
       (@counter
       ,1234
       ,'ABC Construction'
       ,'ABC'
       ,'ABC Construction'
       ,'ABC Construction'
       ,@now
       ,null
       ,'seed'
       ,@now
       ,null
       ,null)

       END
  • 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-01T22:12:14+00:00Added an answer on June 1, 2026 at 10:12 pm

    It doesn’t insert anything because your WHILE condition is:

    WHILE @counter < @numtoinsert 
    

    And 101 > 100, so it never enters the loop.

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

Sidebar

Related Questions

MSDN says that public static members of System.Windows.Application are thread safe. But when I
It says that if there is a virtual function, it is a good practice
The standard says that dereferencing the null pointer leads to undefined behaviour. But what
I know that the C++ standard says that return 0 is inserted at the
The bash man says that variable expansion occurs before command substitution. I was seeking
Just like the title says here is a sample of the command that I'm
The Effective Java says that readResolve works only if all fields are transient .
The Android documentation says that best practices are to make two drawable directories -
Everything that I read about sockets in .NET says that the asynchronous pattern gives
My friend says that Django only has 1 thread or something? And I have

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.