Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Sql Server - Generate Scripts Expand / Collapse
Author
Message
Posted Monday, July 15, 2013 12:26 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, September 26, 2014 7:36 AM
Points: 229, Visits: 730
Hi Team,

i want to generate Table with Data Scripts with Tasks > Generate Scritps,

but i dont to all the records, i want only few records scripts based on condition..

how to generate, Please suggest...
Post #1473465
Posted Monday, July 15, 2013 12:54 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 8:15 AM
Points: 13,017, Visits: 10,800
The tool generates all the data found in the table, so it's all or nothing.
Maybe you can create a duplicate table and insert into that table only the data that you want and then generate the scripts.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1473477
Posted Monday, July 15, 2013 9:45 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Sunday, September 29, 2013 1:24 AM
Points: 429, Visits: 1,721
Minnu (7/15/2013)
Hi Team,

i want to generate Table with Data Scripts with Tasks > Generate Scritps,

but i dont to all the records, i want only few records scripts based on condition..

how to generate, Please suggest...

Use Tasks|Generate Scripts to create your 'CREATE TABLE' script WITHOUT data (or just right-click on the target table and 'SCRIPT TABLE AS...' Then use Tasks|Export Data which will let you enter a query based on your required filters to populate the new table as needed.

 
Post #1473736
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse