[SQL] returning on inserts

2008-03-27 Thread chester c young
insert into t1( c1 ) select c1 from t2 returning t1.c1, t2.c2; ERROR: missing FROM-clause entry for table "t2" is there any way to make this work? Never miss a thing. Make Yahoo your home page. http://

Re: [SQL] link to Jsp

2008-03-27 Thread Craig Ringer
Shavonne Marietta Wijesinghe wrote: > Hello > > I'm trying to connect to my postgresql db from a JSP page but my db is on one > computer and the jsp in another.. > > Has anyone done something like this before?? > > private synchronized Connection getConnection() throws > ClassNotFoundExcepti

Re: [SQL] Finding all References to a Primary Key

2008-03-27 Thread Erik Jones
On Mar 26, 2008, at 1:19 PM, Matthew T. O'Connor wrote: I'm sorry if this is has been discussed, but I tried to find the answer in the archives and failed, so... How do I find all the rows in other tables that reference a specific row in another table? I'm only trying to find rows that are

[SQL] link to Jsp

2008-03-27 Thread Shavonne Marietta Wijesinghe
Hello I'm trying to connect to my postgresql db from a JSP page but my db is on one computer and the jsp in another.. Has anyone done something like this before?? private synchronized Connection getConnection() throws ClassNotFoundException, SQLException { final String DRIVER = "org

Re: [SQL] Export Access 97 to PostgreSQL

2008-03-27 Thread Roberto Spier
Shavonne Marietta Wijesinghe escreveu: Hello I have a db in MS Access 97 and now i have to import the data in PostgreSQL. I can create the table structure in PostgreSql but in what format can i export the table from Access so Postgresql can read it? Thanks Shavonne Export the data, instea

Re: [SQL] Export Access 97 to PostgreSQL

2008-03-27 Thread Shavonne Marietta Wijesinghe
Thanks.. So it was a uppercase problem ;) Shavonne. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql

Re: [SQL] Export Access 97 to PostgreSQL

2008-03-27 Thread Marcin Stępnicki
On Thu, Mar 27, 2008 at 11:06 AM, Shavonne Marietta Wijesinghe <[EMAIL PROTECTED]> wrote: > COPY REGIONI FROM (...) > Strange coz i created the table. Why doesn't it seem to find it?? > > CREATE TABLE "REGIONI" You need to quote the name in your COPY command as well. -- Sent via pgsql-sql mail

Re: [SQL] Export Access 97 to PostgreSQL

2008-03-27 Thread Shavonne Marietta Wijesinghe
Strange coz i created the table. Why doesn't it seem to find it?? CREATE TABLE "REGIONI" ( "AREA" int4, "PERIMETER" int4, "REGIONI_" int4, "REGIONI_ID" int4, "COD_REG" int4, "REGIONE" text ) WITHOUT OIDS; -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to yo

Re: [SQL] Export Access 97 to PostgreSQL

2008-03-27 Thread Ivan Sergio Borgonovo
On Thu, 27 Mar 2008 10:03:57 +0100 "Shavonne Marietta Wijesinghe" <[EMAIL PROTECTED]> wrote: > Thanks. I tried the following command > > COPY REGIONI FROM > 'C:/Inetpub/wwwroot2/FORMWebSite1/database/FormAjax/REGIONI.copy' > WITH DELIMITER '\t'; > > But i get this error > > ERROR: relation "r

Re: [SQL] Export Access 97 to PostgreSQL

2008-03-27 Thread Shavonne Marietta Wijesinghe
Thanks. I tried the following command COPY REGIONI FROM 'C:/Inetpub/wwwroot2/FORMWebSite1/database/FormAjax/REGIONI.copy' WITH DELIMITER '\t'; But i get this error ERROR: relation "regioni" does not exist Here is a sample of my file (fields seperated with a tab) 1360077,00 848351,00 2