Sebastien_Lachance wrote: My english is not so great That's okay - I read some of your blog and it looks like your English is very good. I guess you were just typing in a hurry. Sebastien_Lachance wrote: I have a Select statement that select some records. Then I want to send those record on another database. So I wanted to generate a Insert Script, that "Insert" those record. If the two tables have the same columns then the easiest thing is:
INSERT INTO [DestinationDatabase].[dbo].[DestinationTableName]
SELECT *
FROM [SourceDatabase].[dbo].[SourceTableName]
You can, of course, use any select statement that returns the data you need. Does this help?
Do you want to know more? WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums
Upcoming talk: SELECT UserName, Password FROM Users -- Getting unauthorised access to a SQL Server, and how to prevent it.