Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add Multiple Column Entries to Database Table at 1 time

Status
Not open for further replies.

mhamlett

Programmer
Oct 20, 2014
10
US
Hello

I am looking to add multiple column entries to existing database table by way of script, i.e.;


Column1-- Column2-- Column3-- Column4

12345----- Testing---- Testing---- Testing


How can I repeat/input this exact data for 500 rows in a single script?

The End User will be using a form with 4 textboxes followed by a submit button. txtbox1 = Column1, and so on...
Lets say Column4 holds a value of qty. which will equal the total amount of rows I would like added to the table, any idea how i could accomplish this?

Feel free to ask any questions you may have

Thanks in advance!
 
Ok, I do have a question. What have you tried so far?

An unforeseen consequence of the information revolution has been the exponential propagation of human error.
 
SELECT TOP 500
'12345' AS Column1
,'Testing' AS Column2
,'Testing' AS Column3
,'Testing' AS Column4
FROM sys.all_objects


I have someone from another forum helping me out and he gave me this script, which does insert the data just as I needed but I will have to figure out how to program this script to correlate with tex boxes and a control in asp.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top