Click here to Skip to main content
16,021,911 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Plz help


How i can handle mapping concepts if my excel sheet columns like(FName,MName,LName etc) and
my database table columns FirstName,MiddleName,LastName etc.here i want to import excel sheet data to
database table.is it possible mapping between excel sheet and table.
Here excel columns are given below:

Fieldcolumns               ValueColumns     
Identity                   self
Title                      Mr
FName                      Sachin
MName                      J.
LName                      Sharma
Gender                     M
Date of Birth              19/12/1987
PAN                        PQR2334
Occupation                 Engineer
Marital Status             Single
Residential Status         xyz
Health Status              Good
Health Details              -
Mobile                    8097979710
EMail                     Sachin@gmail.com
Office No                   --
Fax No                     ...
Photo                      ...
relationship               ...






Help
Thanks in advance
phoolchand y.
Posted
Updated 13-Mar-12 4:54am
v11

1 solution

example:
SQL
SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
                'Excel 8.0;Database=myExcelfile.xls;IMEX=1',
                'SELECT FirstName, MiddleName, lastName
                 FROM [Sheet1$]' )   as c
inner join MiAA4IFS as d on d.fname=c.FirstName and d.mname=c.MiddleName and d.lname =c.lastName
 
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