|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Multiple Insert Into
I know this is probably super easy, but I have a table with a bunch of records that need to be changed. To do this I'm just deleting them all and then inserting the new records. Deleting I can do no problem, but my insert isn't working right.
I can't figure out how to set the other values I need. I can insert a single value, but how do I do multiple values? Here is my code: INSERT INTO dbo.testable (pk_Code, Item, Comment, Cost, Status) VALUES ('TEST2', 'test2 blah blah blah blah blah blah blah blah', NULL, ' 0 ', 1) I want to be able to add ('TEST3,....') and ('TEST4,...'), etc. I've looked everywhere for an explanation on how to do this but it always shows insert into statements as pulling data from another table so I'm totally lost on this one... Thanks in advance. |
|
#2
|
|||
|
|||
|
It sounds like you need to use an UPDATE, which lets you modify an existing record in the table.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
||||
|
||||
|
Where is your INSERT (or UPDATE) values
(VALUES ('TEST2', 'test2 blah blah blah blah blah blah blah blah', NULL, ' 0 ', 1) coming FROM? Another table in the database? |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Multiple Insert Into |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|