By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,856 Members | 2,179 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,856 IT Pros & Developers. It's quick & easy.

list of countries and their states

maliksleo
100+
P: 115
hi

i m new in this topic what i am searching is that i want to add the whole list of countries and their states in my database. Is there any one who have that list? and want to help me else give me any link from where i can get the list please help me.

maliksleo
Apr 29 '09 #1

✓ answered by maliksleo

thanks to all of you

i found a solution for this and i want to share it with you people. Heres the link for you from where you can download the database along with the CSV files List of countries & there major cities enjoy

maliksleo

Share this Question
Share on Google+
8 Replies


ck9663
Expert 2.5K+
P: 2,878
First, find your list in google. Then let's discuss how you can create it as tables.

--- CK
Apr 29 '09 #2

maliksleo
100+
P: 115
@ck9663
thanks for your quick reply

i wnat to add this list countries & cities along with all the states of America
is it possible?

maliksleo
Apr 29 '09 #3

ck9663
Expert 2.5K+
P: 2,878
Yes. Depends on how you will use it, it could be a single table or two tables. Create your list as a comma delimited file or an EXCEL file and use import to upload it to your SQL Server.


--- CK
Apr 29 '09 #4

maliksleo
100+
P: 115
@ck9663
Sorry dude i am not getting your point please give me a detailed view

maliksleo
Apr 29 '09 #5

ck9663
Expert 2.5K+
P: 2,878
Grab the data that you need to upload to your database and create a .CSV file. Then you can upload the CSV file to your SQL server.

--- CK
Apr 29 '09 #6

100+
P: 142
You just do the following:
1. Create Excel file with state and country list. eg: Country State
US New Jersy

2. Right click on a database in management studio and select tasks and select export data option.
3.It will show import/export wizard.
4.Select Datatsource as "Microsoft Excel" and give filepath as excel file path which contains your country and state list.
5.Select destination database.
6.Give name to the new table and submit.
7.Now it will save the table with data in the destination database.

Please read how to export/import data in SQL server for more details.



5.
Apr 29 '09 #7

maliksleo
100+
P: 115
@balame2004
thanks for your reply but there is no such option in my SQL server 2005 as export data option so kindly guide me how will i do this in SQL 2005 i have the csv file and i also created the tables. Waiting for your reply

maliksleo
Apr 30 '09 #8

maliksleo
100+
P: 115
thanks to all of you

i found a solution for this and i want to share it with you people. Heres the link for you from where you can download the database along with the CSV files List of countries & there major cities enjoy

maliksleo
Apr 30 '09 #9

Post your reply

Sign in to post your reply or Sign up for a free account.