On Fri, Jul 13, 2012 at 10:39 AM, MB Software Solutions, LLC <mbsoftwaresoluti...@mbsoftwaresolutions.com> wrote: > SQL Server 2008 R2 > > I'm trying to create a simple sql script to create sample data. I want > to keep it lean, just simple INSERT INTOs. I attempt a TRUNCATE TABLE > ahead but it balks on the constraints. > > Suggestions/Ideas? I guess DELETE FROM instead? Haven't tried that yet. --------------
Remove the constraint(s). For sample data don't put them back in. When you want to push to stage then put them in. In SSMS you can see the constraints under the table. Rt click on it and Script for Drop Create and put it into it's own editor pane. SAVE this text and just highlight the Drop now and press F5 to execute it. -- Stephen Russell Sr. Analyst Ring Container Technology Oakland TN 901.246-0159 cell _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CAJidMYKrpfZQiNYsT60uoD0i98m0TLq7jTGs=weuqxktbew...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.