Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 multiple insert

Author  Topic 

born2acheive
Yak Posting Veteran

65 Posts

Posted - 2006-10-04 : 01:46:08
hi, i have 4 textboxes in my form. i have one column in my table such as names.
i am filling names in those taxtboxes,so i want to use only one query to insert 4 textbox values in my column(names).so please tell me query to do this. is tere any insert all query in sqlserver?please give me query for my need

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-10-04 : 02:10:02
[code]Create Procedure InsertData
(
@val1 varchar(50),
@val2 varchar(50),
@val3 varchar(50),
@val4 varchar(50)
)
as
begin
Insert into myTable(Names)
Select @val1 union all
Select @val2 union all
Select @val3 union all
Select @val4
end[/code]

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

born2acheive
Yak Posting Veteran

65 Posts

Posted - 2006-10-04 : 04:07:44
hi harsh_athalye thanks a lot.
Go to Top of Page
   

- Advertisement -