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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 inserting several rows into a table at once..

Author  Topic 

fgeorge
Starting Member

6 Posts

Posted - 2004-08-13 : 12:39:41
can you give me an example of a query that inserts all records in a view at once..eg

insert into xxx select all from view_name (will this work???)


what happens if one of the rows in the view does not get inserted?
will the whole thing fail?

thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-08-13 : 12:44:51
Yes you would use a select query in the insert to get the rows from view_name into xxx.

Yes the whole thing would fail as it is a single query in a transaction.

Tara
Go to Top of Page
   

- Advertisement -