Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > Re: create data...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 6 Topic 3058 of 3215
Post > Topic >>

Re: create database from text file, to delete columns

by sdavis2@[EMAIL PROTECTED] ("Sean Davis") Apr 2, 2008 at 11:02 AM

On Wed, Apr 2, 2008 at 10:56 AM, e-letter <inpost@[EMAIL PROTECTED]
> wrote:
> Readers,
>
>  I am using a program that saves data in csv format. I have realised
>  that I cannot view the file in my spreadsheet due to 256 column limit.
>
>  I think that I need to im****t the file into a database. Then I want to
>  review, then delete columns with null data.
>
>  I guess I can use the 'copy from' command? Also I do not know the
>  total number of columns so can I im****t into an empty database and the
>  columns are automatically created from the end of each line?

No.  You can easily use python, perl, R, java, or some other language
to parse the file and generate the create table statements.  However,
if you just need to remove some columns, you do not really need the
database at all.  Just use a little script (again, in a scripting
language) to remove the columns you like.

Sean

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 6 Posts in Topic:
create database from text file, to delete columns
inpost@[EMAIL PROTECTED]   2008-04-02 15:56:24 
Re: create database from text file, to delete columns
sdavis2@[EMAIL PROTECTED]  2008-04-02 11:02:13 
Re: create database from text file, to delete columns
inpost@[EMAIL PROTECTED]   2008-04-03 13:52:55 
Re: create database from text file, to delete columns
sdavis2@[EMAIL PROTECTED]  2008-04-03 10:32:10 
Re: create database from text file, to delete columns
inpost@[EMAIL PROTECTED]   2008-04-03 15:43:01 
Re: create database from text file, to delete columns
sdavis2@[EMAIL PROTECTED]  2008-04-03 11:00:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Sep 8 2:43:07 CDT 2008.