[GENERAL] Problems Importing table to pgadmin

2016-12-07 Thread metaresolve
Hi,

pgAdmin 4
Windows 10

I'm brand new and struggling. I was able to create a table with the CREATE
TABLE command and set up the columns. However, when I try to "import"
nothing happens, at all. I import the table and hit Ok and nothing happens.
If I SELECT * from [table] I get no rows back. I'm not sure what I'm doing
wrong. 

This is the query i used to create the table:

CREATE TABLE cc_20161207 (
status varchar(1),
precinct_num varchar(4),
congress varchar(1),
assembly varchar(2),
senate varchar(2),
commission varchar(1),
education varchar(1),
regent varchar(2),
school varchar(1),
city varchar(3),
ward varchar(3),
township varchar(3),
first_name varchar(20),
middle_name varchar(20),
last_name varchar(30),
name_suffix varchar(3),
sex varchar(1),
party_reg varchar(3),
birth_year varchar(4),
phone_num varchar(12),
res_street_num varchar(6),
res_direction varchar(2),
res_street_name varchar(25),
res_address_type varchar(4),
res_unit varchar(20),
res_city varchar(40),
res_state varchar(2),
res_zip_code varchar(5),
mail_address varchar(32),
mail_city varchar(50),
mail_state varchar(2),
mail_zip_code varchar(5),
activity_date varchar(10),
registration_date varchar(10),
registration_num varchar(9),
language_pref varchar(10),
polling_code varchar(3),
confidential_flag varchar(1),
id_not_reqd varchar(1),
affidavit varchar(45),
election1 varchar(4),
vote_type1 varchar(1),
election2 varchar(4),
vote_type2 varchar(1),
election3 varchar(4),
vote_type3 varchar(1),
election4 varchar(4),
vote_type4 varchar(1),
election5 varchar(4),
vote_type5 varchar(1),
election6 varchar(4),
vote_type6 varchar(1),
election7 varchar(4),
vote_type7 varchar(1),
election8 varchar(4),
vote_type8 varchar(1),
election9 varchar(4),
vote_type9 varchar(1),
election10 varchar(4),
vote_type10 varchar(1),
election11 varchar(4),
vote_type11 varchar(1),
election12 varchar(4),
vote_type12 varchar(1),
election13 varchar(4),
vote_type13 varchar(1),
election14 varchar(4),
vote_type14 varchar(1),
election15 varchar(4),
vote_type15 varchar(1),
election16 varchar(4),
vote_type16 varchar(1),
election17 varchar(4),
vote_type17 varchar(1),
election18 varchar(4),
vote_type18 varchar(1),
election19 varchar(4),
vote_type19 varchar(1),
election20 varchar(4),
vote_type20 varchar(1)
);

However, when I look at the table it's got the OID fields in there. From
what I read, the default is set to off, so I don't understand why they're
creating them.

 

I think this is the problem because the main error I'm getting is the 42601
that, when I googled, seemed to mean it was trying to import a table with a
different amount of fields.

I tried to ALTER TABLE to drop the OID columns but no luck.
When I try to COPY cc_20161207 from "file" I get this error:

 

When I try to right-click on the table and import, I go through the dialogue
and click "OK" but nothing ever happens.

Can someone help me with where I'm going wrong?
Thanks,
meta



--
View this message in context: 
http://postgresql.nabble.com/Problems-Importing-table-to-pgadmin-tp5933807.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Importing table to pgadmin

2016-12-07 Thread metaresolve
Thank you! It was the double quotes. I did run into the permissions error
afterwards but I solved it with a google search.

Thanks,
meta



--
View this message in context: 
http://postgresql.nabble.com/Problems-Importing-table-to-pgadmin-tp5933807p5933812.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Importing table to pgadmin

2016-12-07 Thread metaresolve
That's a little beyond me. Let me back up a sec and maybe you guys can
help.

I used to use Access to do my data crunching, matching, and cleaning at my
old job. I worked with a max of 600k records so Access could handle it. I
know, lame, but it's what I knew.

I was using Alteryx the past 8 months on files of 20M and higher. But, I got
laid off, so I don't have access to that software anymore.
[
My thought was to use postgreSQL as a kind of more advanced Access that I
could use to crunch numbers on similarly. However, My file has 1.1M records
on it and pgadmin seems to be choking on it. 

How many records and relational tables can pgadmin/postgres actually handle?
I'm anticipating tests for my upcoming job hunts and I need something that
gives me query capability. I figured since I used to do it in Access I could
do it in SQL. 

(btw, the reason I picked postgreSQL is my friend from my old job uses it
and likes it. i thought it would be easier to get help from her.)

Any input?



--
View this message in context: 
http://postgresql.nabble.com/Problems-Importing-table-to-pgadmin-tp5933807p5933818.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Importing table to pgadmin

2016-12-07 Thread metaresolve
Choking: I get the "Waiting for the query execution to complete" circling
around for a while. I tried shutting it down and trying again but it's still
freezing on the execution. But if the TB are accurate, I wonder why it's
slowing on this? Any thoughts?



--
View this message in context: 
http://postgresql.nabble.com/Problems-Importing-table-to-pgadmin-tp5933807p5933826.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


Re: [GENERAL] Problems Importing table to pgadmin

2016-12-07 Thread metaresolve
Uh, yeah, it was a SELECT * from cc_20161207;

I know, it was dumb. I didn't realize it would break it or at least run for
a while. I tend to do things in small steps, run a query, check my results,
then tweak. 

You're right, I wouldn't want to be viewing those million. so I guess I
could just be doing the top 1 rows to get a sense, then be doing my
aggregate group bys/etc to get my final numbers? That's how I hacked Access
to be my data analysis program until I got to Alteryx. But I was also never
using files of 1M then.




--
View this message in context: 
http://postgresql.nabble.com/Problems-Importing-table-to-pgadmin-tp5933807p5933831.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general