Generate Insert Statement
-
Is someone know the way to generate Insert script of a couple of selected record in a databae ? To after execute to script on another databse/server ? sebastien.lachance.blogspot.com
-
Is someone know the way to generate Insert script of a couple of selected record in a databae ? To after execute to script on another databse/server ? sebastien.lachance.blogspot.com
Sorry, but that makes no sense. Can you try describing your problem again?
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.
-
Sorry, but that makes no sense. Can you try describing your problem again?
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.
Sorry, I will try again. 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. My english is not so great, but I try to become better. Sorry.:omg: sebastien.lachance.blogspot.com
-
Sorry, I will try again. 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. My english is not so great, but I try to become better. Sorry.:omg: sebastien.lachance.blogspot.com
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.