Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server Newbies
»
Create Insert data script for views
Create Insert data script for views
Rate Topic
Display Mode
Topic Options
Author
Message
Krishna1
Krishna1
Posted Monday, March 04, 2013 11:23 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Today @ 1:55 AM
Points: 127,
Visits: 280
Dear All
For one table I need to create insert statemetn with data. For this I used SSMS-Task -Generate script - Data only it creates inserts will all the rows.
But i need only few selected rows.Hence created a view and tried the same thing but it does not generate insert script with data.
I am doing somthing wrong?
Regards
Post #1426606
Krishna1
Krishna1
Posted Tuesday, March 05, 2013 1:46 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Today @ 1:55 AM
Points: 127,
Visits: 280
I have acheved it using a new table instead of view
Is there any better way?
Post #1426642
ChrisM@Work
ChrisM@Work
Posted Tuesday, March 05, 2013 1:48 AM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 9:32 AM
Points: 5,613,
Visits: 10,981
Krishna1 (3/4/2013)
Dear All
For one table I need to create insert statemetn with data. For this I used SSMS-Task -Generate script - Data only it creates inserts will all the rows.
But i need only few selected rows.Hence created a view and tried the same thing but it does not generate insert script with data.
I am doing somthing wrong?
Regards
INSERT INTO newtable (columnlist) SELECT columnlist FROM oldtable WHERE...
“Write the query the simplest way. If through testing it becomes clear that the performance is inadequate, consider alternative query forms.”
- Gail Shaw
For fast, accurate and documented assistance in answering your questions, please read
this article
.
Understanding and using APPLY, (I)
and
(II)
Paul White
Hidden RBAR: Triangular Joins
/
The "Numbers" or "Tally" Table: What it is and how it replaces a loop
Jeff Moden
Exploring Recursive CTEs by Example
Dwain Camps
Post #1426644
Krishna1
Krishna1
Posted Tuesday, March 05, 2013 4:36 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Today @ 1:55 AM
Points: 127,
Visits: 280
Thanks. That what i have done,
Select coumn list fom table into newtable where ....
Post #1426743
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.