Click here to Skip to main content
15,886,422 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I want a excel sheet which have all major location in India, combined with all Major city,
because i want use All Location In my Project, so i import Excel file in my Sql Data base,

So if you Have List Of All Location In database(or excel sheet) Then Plz Give Me SCrip Of data base
Posted
Comments
Richard MacCutchan 23-Nov-12 6:32am    
There are plenty of places where you could find this for yourself, probably on one of the Indian Government websites.

I did the hardwork for you. I found the list here[^]

Now its your turn to do the easy work of putting it in the excel or database.
 
Share this answer
 
v2
Comments
Abhishek Pant 23-Nov-12 7:12am    
+5,excellent work here..
bbirajdar 23-Nov-12 8:08am    
Thank you Abhishek :)
Use Distributed Queries

If you do not want to configure a persistent connection to the Excel workbook as a linked server, you can import data for a specific purpose by using the OPENDATASOURCE or the OPENROWSET function. The following code samples also import the data from the Excel Customers worksheet into new SQL Server tables:

SELECT * INTO XLImport3 FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0',
'Data Source=C:\test\xltest.xls;Extended Properties=Excel 8.0')...[City$]

SELECT * INTO XLImport4 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\test\xltest.xls', [City$])

SELECT * INTO XLImport5 FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;Database=C:\test\xltest.xls', 'SELECT * FROM [City$]')

C:\test\xltest.xls - is the full path of the excel file
XLImport3,XLImport4,XLImport5 - are the newly created tables
City$ - name of sheet on the excel file
 
Share this answer
 
v2

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