Re: [SQL] need help in building a query

2008-11-06 Thread Harold A. Giménez Ch.
I personally would help if I understood what you need. I'm sure others feel the same way. Provide DDL, sample data, and expected result of the query. Maybe you'll have better luck... On Thu, Nov 6, 2008 at 11:15 AM, Devil™ Dhuvader <[EMAIL PROTECTED]>wrote: > none can help me? > > On Tue, Nov 4,

Re: [SQL] Truncate on pg_dump / pg_restore

2008-10-25 Thread Harold A. Giménez Ch.
You can, assuming you start off with a pg_dump in custom format (use -Fc). You can use pg_restore's -l option to drop out the list contents of the archive, and then comment out whatever you do not want restored: pg_dump -Fc ... > your_db.dump pg_restore -l your_db.dump > your_db.list # edit

Re: [SQL] pg_dump more than one table in one command?

2008-10-06 Thread Harold A. Giménez Ch.
Looks like you are right, Scott. Thanks! I wasn't in Postgres land back then. On Mon, Oct 6, 2008 at 5:48 PM, Scott Marlowe <[EMAIL PROTECTED]>wrote: > On Mon, Oct 6, 2008 at 3:24 PM, Harold A. Giménez Ch. > <[EMAIL PROTECTED]> wrote: > > > > On Mon, Oct

Re: [SQL] pg_dump more than one table in one command?

2008-10-06 Thread Harold A. Giménez Ch.
You must specify --table (or -t) once for each of the tables, ie: pg_dump -h machineName -U username --inserts --column-inserts --file=dump.sql --table=t1 --table=t2 . . --table=tN -d databaseName ; -t t1 -t t2 -t t3 On Mon, Oct 6, 2008 at 5:02 PM, Emi Lu <[EMAIL PROTECTED]> wrote: > Go

Re: [SQL] COPY command and required file permissions

2008-06-12 Thread Harold A. Giménez Ch.
Thanks for the info. SELinux was the guilty party... On Thu, Jun 12, 2008 at 10:48 AM, Tom Lane <[EMAIL PROTECTED]> wrote: > "=?ISO-8859-1?Q?Harold_A._Gim=E9nez_Ch.?=" <[EMAIL PROTECTED]> > writes: > > In migrating an application from sql server to Postgres, I created a ruby > > script that extra

[SQL] COPY command and required file permissions

2008-06-12 Thread Harold A. Giménez Ch.
Hi all, In migrating an application from sql server to Postgres, I created a ruby script that extracts csv files from sql server (from a windows box), then SCPs them into a directory (/home/ruby_process) on the server running Postgres (a Fedora core 8) and finally runs the Postgres COPY command for

Re: [SQL] SQL question....

2008-05-20 Thread Harold A. Giménez Ch.
I think this is what you're looking for: SELECT * FROM access WHERE ip IN(SELECT ip FROM access GROUP BY ip HAVING count(*) > 1) On Tue, May 20, 2008 at 3:17 PM, Karl Denninger <[EMAIL PROTECTED]> wrote: > chester c young wrote: > > create table access (name text, address ip) > > I