Re: [SQL] Subquery error. Help please!!

2001-06-28 Thread Wei Weng
What version of postgresql are you using? On 27 Jun 2001 17:09:14 -0400, kakerjak wrote: Hey all.. Here's the table definition. CREATE TABLE laboratory ( id int4 NOT NULL, subid int2 NOT NULL, name varchar(30) NOT NULL, CONSTRAINT laboratory_pkey PRIMARY KEY (id, subid))

[SQL]

2001-06-28 Thread Ilan Fait
Title: Hi, I need to know if in PostgerSQL DB has a utility like in Oracle Release 8.1.6 contains a new package called STATSPACK that improves on the UTLBSTAT/UTLESTAT process (or like the UTLBSTAT/UTLESTAT). This information is very important since we are testing PostgerSQL

Re: [SQL] Subquery error. Help please!!

2001-06-28 Thread Tom Lane
kakerjak [EMAIL PROTECTED] writes: If the subquery is placed before the JOIN, like it is above, then the error i get says 'parse error at or near select' If i flip the subquery around with the laboratory table then i get 'parse error at or near (' Are you using 7.1?

Re: [SQL] Problems using a rule with the WHERE clause

2001-06-28 Thread Tom Lane
Luis Sousa [EMAIL PROTECTED] writes: that shouldn't happen, in any case. If this is the current release (7.1.2) The version that I'm using is 7.1release-3.potato.1 I don't see any problem here when I run your script. I suspect you are seeing another consequence of the rewriter bug I fixed

Re: [SQL] Subquery error. Help please!!

2001-06-28 Thread Ross J. Reedstrom
I did something similar, but pu the subselect into a view, in the WHERE clause. SELECT * FROM modules m WHERE (m.module_ident = (SELECT max(modules.module_ident) AS max FROM modules WHERE (m.moduleid = modules.moduleid) GROUP BY modules.moduleid)); The equivalent for you would be something

[SQL] restoring a dump

2001-06-28 Thread Phuong Ma
Hello, I have been trying to restore my dump and it seems like it is not working. I put the dump in a tar file and when I untarred it, there are several .dat files, a toc.dat file, and a restore.sql file. I used psql to restore these files into a database. I first started restoring the

[SQL] Still stuck on a left join

2001-06-28 Thread Ari Nepon
I've been stuck now on a left join for about two weeks. DB is MSaccess2K, language is ASP. I'm learning php and PgSQL now, and will be migrating everything soon. In the mean time. If anyone knows where I am going wrong, please let me know. Here is my current SQL query: SELECT T.ID, T.employee,

Re: [SQL] restoring a dump

2001-06-28 Thread Phuong Ma
Peter Eisentraut wrote: Phuong Ma writes: pg_dump -C -D -F t test.tar tar -xvf test.tar psql restore.sql psql test 19.dat psql test 20.dat .. and so on psql test toc.dat I believe you're supposed to use pg_restore on the tar file itself. -- Peter Eisentraut [EMAIL