Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Bonjour à tous,

Avant toute chose, je m'excuse si ma question est triviale (je suis débutant). Voilà mon problème:

- je dispose d'une base de donnée sql server2008 avec une table ayant les colonnes 1- Clef primaire "reference" / 2- Champs texte "Nom" / 3- Champs numérique "Nº de série"

- je dispose d'un fichier Excel possédant plusieur champs 1- Champs texte "Nom" / 2- Champs texte "Nº de série"/ 3- Champs texte "commentaire"/ 4- Champs texte "remarque"

- je souhaite importer le fichier Excel dans ma table sql server avec les règles de gestion suivantes.
1) rejeter les lignes dont le contenu du reference est déjà dans ma table

3)condition de remplissage de la table => éviter les doublons
4) si l'enregistrement existe déjà dans la table destination,'on passe à la ligne suivante sans l'importer
5)choisir la ligne de début de l'importation


Pouvez vous me confirmer avant tout de chose que c'est possible? Et si quelqu'un a le courage de m'expliquer...


Merci beaucoup!


ok thank you for the information ^_^
Hello everyone,

First of all, I apologize if my question is trivial (I am a beginner). Here's my problem:

- I have a sql Server2008 data base with a table having columns 1- Primary Key "reference" / 2 text fields "Name" / 3- digital fields "Serial No."

- I have an Excel file with a lot of fields 1- text fields "Name" / 2 text fields "Serial No." / 3- Champs text "comment" / 4- Champs text "remark"...

- I want to import the Excel file in my sql server table with the following management rules.
1) reject rows with the contents of the reference table is already in my table

3) filling condition of table => avoid duplication
4) if the record already exists in the destination table, one goes to the next line without importing
5) Choose the line start importing


Can you confirm foremost thing is possible? And if someone has the courage to tell me ...


Thank you very much!

What I have tried:

importer un fichier excel dans une table sql server avec vb.net
Posted
Updated 15-Jul-16 5:53am
v7
Comments
Richard MacCutchan 15-Jul-16 7:20am    
You may not have noticed, but this is an English language site.
Member 11305502 15-Jul-16 11:11am    
ok thank you for the information ^_^
Hello everyone,

First of all, I apologize if my question is trivial (I am a beginner). Here's my problem:

- I have a sql Server2008 data base with a table having columns 1- Primary Key "reference" / 2 text fields "Name" / 3- digital fields "Serial No."

- I have an Excel file with a lot of fields 1- text fields "Name" / 2 text fields "Serial No." / 3- Champs text "comment" / 4- Champs text "remark"...

- I want to import the Excel file in my sql server table with the following management rules.
1) reject rows with the contents of the reference table is already in my table

3) filling condition of table => avoid duplication
4) if the record already exists in the destination table, one goes to the next line without importing
5) Choose the line start importing


Can you confirm foremost thing is possible? And if someone has the courage to tell me ...


Thank you very much!
Richard MacCutchan 15-Jul-16 11:52am    
Yes it is possible, please follow the link I gave you earlier and see how easy it is to read Excel data.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900