Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
picatshou
Starting Member
12 Posts |
Posted - 2014-04-25 : 09:11:12
|
hi all i have three tabe on excel the first one is offre it containslibo IDT IDCoffre1 T1 C1offre2 T2 C2offre3 T2 C2 .type:IDT libTT1 typeoneT2 typetwocategoryIDC LIBCC1 categoryoneC2 categorytwoi make three table in sql server for offre i add an auto incremental IDOand IDT ,IDC are foreign keys but when i execute i have this error message Erreur 0xc0202009: Tâche de flux de données 1: Code d'erreur SSIS DTS_E_OLEDBERROR. Une erreur OLE DB s'est produite. Code d'erreur : 0x80004005.Un enregistrement OLE DB est disponible. Source : « Microsoft SQL Server Native Client 10.0 » Hresult : 0x80004005 Description : « L'instruction a été arrêtée. ».Un enregistrement OLE DB est disponible. Source : « Microsoft SQL Server Native Client 10.0 » Hresult : 0x80004005 Description : « L'instruction INSERT est en conflit avec la contrainte FOREIGN KEY "FK_offre_catégorie". Le conflit s'est produit dans la base de données "PFE", table "dbo.catégorie", column 'IDC'. ». (Assistant Importation et Exportation SQL Server)how can i solve this problem ?thnx a lot for any answer |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2014-04-25 : 09:35:36
|
have a look at your excel table with data for category.The values in column IDC MUST BE unique. Too old to Rock'n'Roll too young to die. |
|
|
picatshou
Starting Member
12 Posts |
Posted - 2014-04-25 : 10:08:22
|
hi thnx for answer in fact the excel table category contain this :categoryIDC LIBCC1 categoryoneC2 categorytwoC1 and C2 are considered as not unique ?i don't know what should i do ?thnx a lot for any answer |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2014-04-29 : 13:40:56
|
category must be the FIRST table in order to load.You can't import offre if category isn't already inserted. Too old to Rock'n'Roll too young to die. |
|
|
|
|
|