jwcolby
jwcolby at colbyconsulting.com
Sat Jul 23 07:43:25 CDT 2011
I am building the scripts one by one by clicking on the table and right clicking "script table as". Is there some way to script the whole shebang at once time into a single script? John W. Colby www.ColbyConsulting.com On 7/23/2011 2:55 AM, Arthur Fuller wrote: > Yes, or alternatively re-order the script's execution sequence to populate > all the lookup tables first, and only then populate the main tables. > > FWIW, I agree that these MS tools ought to do a far better job at this, and > understand in which order the tables ought to be created. > > A. > > On Sat, Jul 23, 2011 at 1:40 AM, jwcolby<jwcolby at colbyconsulting.com>wrote: > >> I have a database designed on SQL Server 2008 Express which is a later >> version (10.50) than my full version (10.0). I cannot backup and restore >> backwards nor can I detach / attach. >> >> Thus I am scripting as create each table and copying the script to a new >> database (same name) on the older software version Server. My problem is >> that the scripts have constraints which are PK/FK pairs. Each table has >> these constraints but one half of the constraint will always be missing as I >> run these scripts. Is there a way to tell SQL server to create but ignore >> the constraints as I create the tables and even as I load the tables with >> the existing data and then "turn on" the constraints at the very end? >> >> Or do I need to move the constraint SQL into a separate query, create the >> tables, load the data and then create the constraints at the end? >> > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > >