[SQL] How do I use text script containing SQL?

2001-03-05 Thread Jeff S.
I want to build my tables by placing all the sql statements in a file. What is the correct way to use this file with psql? Example: My text file has this in it: CREATE TABLE table1 ( table1_id serial, field1 char(5), PRIMARY KEY (table1_id) ); I want to be able to use the file to crea

[SQL] COPY isn't working right for me

2001-02-13 Thread Jeff S.
I have a tab delimited file that I'm trying to import into an empty table. I've set the table up as follows: create table member ( member_id serial not null, fname varchar(25) not null, lname varchar(25) not null, member_since date not null, Primary Key (member_id) ); My member.txt file looks l