<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "import countyInfo.txt postgresql"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "import countyInfo.txt postgresql"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>import countyInfo.txt postgresql</title>
				<description><![CDATA[  :oops: newbee asking maybe

i use some post here and found i am not the only one in trouble to importe this file in the table 

some change the table 
some change the script or the file 

but into some line there something like that : 

##^(?:AD)*(\d{3})$ 

wich not like by psql 

i remove line starting with # for comments 

but what means this ##^(?:AD)*(\d{3})$  is it to be interpreted by some database functions ? 
did we need to replace by something before import to countryInfo table 

thanks for your works sure and you help ...:?:

tonton ]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1208.page#5151</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1208.page#5151</link>
				<pubDate><![CDATA[Fri, 9 Jan 2009 02:23:07]]> GMT</pubDate>
				<author><![CDATA[ tonton]]></author>
			</item>
			<item>
				<title>Re:import countyInfo.txt postgresql</title>
				<description><![CDATA[ These are two columns describing how the postal codes in the country look like. Delete them if you don't like them.

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1208.page#5152</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1208.page#5152</link>
				<pubDate><![CDATA[Fri, 9 Jan 2009 07:41:48]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Re:import countyInfo.txt postgresql</title>
				<description><![CDATA[ high marc thanks for your answer 

i'am french and not sure my translate

i just search to understand how it is made and what it's mean !

it is something like having a fish and knowing phishing :roll: 

so how to import that data into countryinfo tables 

cause psql hanging with data starting with ## 

what i have to delete for correct import 
with table creat with the faq 

http://forum.geonames.org/gforum/posts/list/67.page

copy countryInfo  (iso_alpha2,iso_alpha3,iso_numeric,fips_code,name,capital,areaInSqKm,population,continent,languages,currency,geonameId) from 'countryInfo.txt' null as ''; not match cause 
##^(?:AD)*(\d{3})$

does i delete a column 
just ## and then ### #### so on 
all things between # and $
i right quote in file for beeing accept data 


 :?: ]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1208.page#5154</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1208.page#5154</link>
				<pubDate><![CDATA[Fri, 9 Jan 2009 18:21:08]]> GMT</pubDate>
				<author><![CDATA[ tonton]]></author>
			</item>
			<item>
				<title>Re:import countyInfo.txt postgresql</title>
				<description><![CDATA[ The faq entry is refering to a previous version of the file. 
The file is tab separated, to remove columns you can use a lot of tools, excel for instance.

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1208.page#5156</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1208.page#5156</link>
				<pubDate><![CDATA[Fri, 9 Jan 2009 22:59:07]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>import countyInfo.txt postgresql</title>
				<description><![CDATA[ OK it's made thanks 

i create a table in my database 
<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>
 CREATE TABLE "countryinfo" &#40;
      iso_alpha2 char&#40;2&#41;,
      iso_alpha3 char&#40;3&#41;,
      iso_numeric integer,
      fips_code character varying&#40;3&#41;,
      country character varying&#40;200&#41;,
      capital character varying&#40;200&#41;,
      areainsqkm double precision,
      population integer,
      continent char&#40;2&#41;,
      tld CHAR&#40;10&#41;,
      currency_code char&#40;3&#41;,
      currency_name CHAR&#40;15&#41;,
      phone character varying&#40;20&#41;,
      languages character varying&#40;200&#41;,
      geonameId int,
      neighbours character varying&#40;50&#41;,
      equivalent_fips_code character varying&#40;3&#41;
 &#41;;
</pre>
		</div>
I change file countryInfo.txt in the file join 1countryInfo.txt

and use <span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>

 copy countryInfo &#40;iso_alpha2,iso_alpha3,iso_numeric,fips_code,country,capital,areainsqkm,population,continent,tld,currency_code,currency_name,phone,languages,geonameid,neighbours,equivalent_fips_code&#41;from '1countryInfo.txt' null as '';
</pre>
		</div>
result : COPY 247  :roll: 

tonton]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1208.page#5158</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1208.page#5158</link>
				<pubDate><![CDATA[Sat, 10 Jan 2009 03:36:40]]> GMT</pubDate>
				<author><![CDATA[ tonton]]></author>
			</item>
			<item>
				<title>import countyInfo.txt postgresql</title>
				<description><![CDATA[ hi ,
i am importing the alcountries.txt into mysql using gui sql tool, i used the command load 

LOAD DATA INFILE'C:\Documents and Settings\kim\Desktop\king-test-thu\geonames-66000-test.txt' INTO TABLE geonames.geoname (geonameid,name,asciiname,alternativenames,latitude,longitude,fclass,fcode,country,cc2, admin1,admin2,admin3,admin4,population,elevation,gtopo,timezone,moddate);

i am getting errors as table not found File 'C:Documents and SettingskimDesktopking-test-thugeonames-66000-test.txt' not found (Errcode: 2)

thanks in advance 
khan ]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1208.page#5334</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1208.page#5334</link>
				<pubDate><![CDATA[Tue, 3 Feb 2009 13:11:21]]> GMT</pubDate>
				<author><![CDATA[ vaseem]]></author>
			</item>
			<item>
				<title>Re:import countyInfo.txt postgresql</title>
				<description><![CDATA[ could be a problem with the backslash. Did you trying putting two of them?

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1208.page#5340</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1208.page#5340</link>
				<pubDate><![CDATA[Wed, 4 Feb 2009 22:13:53]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Re:import countyInfo.txt postgresql</title>
				<description><![CDATA[ vaseem you should try to use simple slash  with 'C:/Documents and Settings/kim...' or double backslash 'C:\\Documents and Settings\\kim...'
]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1208.page#5386</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1208.page#5386</link>
				<pubDate><![CDATA[Mon, 9 Feb 2009 11:56:18]]> GMT</pubDate>
				<author><![CDATA[ francisoud]]></author>
			</item>
			<item>
				<title>Re:import countyInfo.txt postgresql</title>
				<description><![CDATA[ thank you i got the solution 

vaseem 
]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1208.page#5405</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1208.page#5405</link>
				<pubDate><![CDATA[Wed, 11 Feb 2009 11:02:29]]> GMT</pubDate>
				<author><![CDATA[ vaseem]]></author>
			</item>
			<item>
				<title>Re:import countyInfo.txt postgresql</title>
				<description><![CDATA[ nice, fixed it in my script too:
http://forum.geonames.org/gforum/posts/list/926.page#5449

cheers,
Bastiaan
]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1208.page#5450</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1208.page#5450</link>
				<pubDate><![CDATA[Wed, 18 Feb 2009 22:23:18]]> GMT</pubDate>
				<author><![CDATA[ bwakkie]]></author>
			</item>
	</channel>
</rss>