X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 16B903A4DF3 for ; Thu, 13 Jan 2005 17:19:16 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 71237-10 for ; Thu, 13 Jan 2005 17:19:13 +0000 (GMT) Received: from post5.inre.asu.edu (post5.inre.asu.edu [129.219.110.120]) by svr1.postgresql.org (Postfix) with ESMTP id 060F03A5966 for ; Thu, 13 Jan 2005 17:19:13 +0000 (GMT) Received: from conversion.post5.inre.asu.edu by asu.edu (PMDF V6.1-1X6 #30769) id <0IA900D01MPN9D@asu.edu> for pgsql-admin@postgresql.org; Thu, 13 Jan 2005 10:17:47 -0700 (MST) Received: from smtp.asu.edu (smtp.asu.edu [129.219.110.107]) by asu.edu (PMDF V6.1-1X6 #30769) with ESMTP id <0IA900C76MPNR4@asu.edu> for pgsql-admin@postgresql.org; Thu, 13 Jan 2005 10:17:47 -0700 (MST) Received: from moroni.pp.asu.edu (moroni.pp.asu.edu [129.219.69.200]) by smtp.asu.edu (8.12.10/8.12.10/asu_smtp_relay, nullclient, tcp_wrapped) with ESMTP id j0DHHkMC026300 for ; Thu, 13 Jan 2005 10:17:46 -0700 (MST) Received: by moroni.pp.asu.edu (Postfix, from userid 500) id 7A314FB3; Thu, 13 Jan 2005 10:17:47 -0700 (MST) Date: Thu, 13 Jan 2005 10:17:47 -0700 (MST) From: David Bear Subject: syntax issue with insert statement To: pgsql-admin@postgresql.org Reply-To: David.Bear@asu.edu Message-id: <20050113171747.7A314FB3@moroni.pp.asu.edu> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.374 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200501/113 X-Sequence-Number: 15972 I'm in process of migrating data. That means lots of data munging. I decided that while I'm coding I should go ahead and create sql syntax rather than just some delimited file. So I produced the following code: docflow=> INSERT INTO student (first_name, last_name, middle_name, added_by, affiliate_id, added_on) VALUES (John, Doe, -, '{john}', 484848484, 02/02/20); ERROR: syntax error at or near "," at character 112 I could not get the INSERT statement to work using the column name VALUES syntax. So, then I tried: docflow=> INSERT INTO student VALUES (29394959, David, Doe, _, 09/09/99, '{test}') That worked. I though I might have quoting issue, but I'm sticking with lower case identifiers. This seems like such a trivial question, but I just cant see where I went wrong. Maybe I've stared at it too long. Please advise. -- David Bear phone: 480-965-8257 fax: 480-965-9189 College of Public Programs/ASU Wilson Hall 232 Tempe, AZ 85287-0803 "Beware the IP portfolio, everyone will be suspect of trespassing"