SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 error import impossible to sql server
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

picatshou
Starting Member

12 Posts

Posted - 04/25/2014 :  09:11:12  Show Profile  Reply with Quote
hi all
i have three tabe on excel
the first one is offre it contains
libo IDT IDC
offre1 T1 C1

offre2 T2 C2
offre3 T2 C2
.

type:
IDT libT
T1 typeone
T2 typetwo

category

IDC LIBC
C1 categoryone
C2 categorytwo

i make three table in sql server
for offre i add an auto incremental IDO

and 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
Flowing Fount of Yak Knowledge

Germany
8765 Posts

Posted - 04/25/2014 :  09:35:36  Show Profile  Visit webfred's Homepage  Reply with Quote
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.
Go to Top of Page

picatshou
Starting Member

12 Posts

Posted - 04/25/2014 :  10:08:22  Show Profile  Reply with Quote
hi thnx for answer
in fact the excel table category contain this :

category

IDC LIBC
C1 categoryone
C2 categorytwo

C1 and C2 are considered as not unique ?
i don't know what should i do ?
thnx a lot for any answer
Go to Top of Page

webfred
Flowing Fount of Yak Knowledge

Germany
8765 Posts

Posted - 04/29/2014 :  13:40:56  Show Profile  Visit webfred's Homepage  Reply with Quote
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.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000