Reply to Re: How to reliably ensure that only one set of rows is bulk imported into a table at a time

Your name:

Reply:


Posted by Erland Sommarskog on 06/27/07 21:28

Weyus (weyus@att.net) writes:
> Because I have two tables, A and B, both of which I need to bulk load.
> B has a foreign key to A. A has constraints on it. B has no
> constraints.
> So I have two files, one for loading A and one for loading B.
>
> If I bulk load A and some of the constraints kick out records, such
> that not all of the records load, then when I load B, I will not have
> a way to know how to set the foreign key in B correctly.
>
> If I was just loading one table, your point would be totally valid.

I can't escape to note that this would be a lot simpler if you did
not use IDENTITY at all.


--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация