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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T12:55:03+00:00 2026-06-08T12:55:03+00:00

I want to enter 100 transactions into a sql server DB that have the

  • 0

I want to enter 100 transactions into a sql server DB that have the same address and phone number but a different name.
Thanks

Ok lots of negative reaction from the happy people so

I want to insert 100 transaction all the same name & address but different PO box. so my insert would look something like this .

Insert into PEOPLE (PO_BOX, NAME , ADDRESS) 
VALUES ('100501', 'MICHAEL COLLINS', 'MBEAL NA BLATH')

How can I do this while keeping the same name and address but incrementing the po box from 100501 to 100600 . The po box is not the primary key as there is already an index key.

THanks

  • 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-08T12:55:07+00:00Added an answer on June 8, 2026 at 12:55 pm

    If your names are stored in another table then you can do the following:

    insert into test (id, name, address, phonenumber)
    select id, name, '123 test dr', '12345678'
    from names
    
    select * from test
    

    See SQL Fiddle with Demo

    Based on your edit, you will do the following:

    declare @recNum int = 0
    
    while @recNum < 100
      BEGIN
        INSERT INTO people (po_box, name, address)
        SELECT 100501 + @recNum, 'MICHAEL COLLINS', 'MBEAL NA BLATH'
    
        set @recNum = @recNum + 1
      END
    
    
    select *
    from people
    

    See SQL fiddle with Demo

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

Sidebar

Related Questions

Scenario: I want to enter an address (Sweden, Stockholm) into an inputfield and get
I have a text-box, and I want to enter a string in language A
I have textarea in my site(link shortening site) i want to user enter some
I'm building a GWT Application. But i dont want user to enter any html
I want that its name would be the page address. For example, if page
I want to have a screen that starts off with $0.00 (or other symbol
I have an image that I am using as a button but on the
I have a result screen that shows bonus points and such. I want each
I have edittext where I want to enter percentage value i.e decimals value, So
I have a website that I want to conduct testing on. All you need

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.