i have two text file which contains countries and city names.
the structure of the files are as
country names =
total fields in the country names text files are 4.
1=cc_fips
2=cc_iso
3=tld
4=country_name
second text file contains the cities name of all the world.
total fields in the cities names are 2
1=cc_fips
2=city_name
i have created a database named "cityofcountries".
in the database i have two tables
1=countries
2=cities
the fields of the countries tables are
1=countryid
2=countryname
3=country_tld
4=country_cc_iso
5=country_cc_fips
and the fileds of the cities table are
1=cityid
2=cityname
3=city_cc_fips
now i want to import the countries data from countries name text file into countries table and cities name data from cities name text file into cities table.
so what will be the query?
how to import data from a text file?
Moderator: General Moderators
Re: how to import data from a text file?
I don't know - you didn't mention the SQL engine you are using. MySQL, PGSQL, MSSQL ... etc.?
There are 10 types of people in this world, those who understand binary and those who don't
Re: how to import data from a text file?
i am using SQLyog Enterprise