From: Robby Slaughter <webmaster@robbyslaughter.com>
To: Gonzo Rock <GonzoRock@Excite.com>
To: pgsql-sql@postgresql.org
Subject: RE: Simple Insert Problem
Date: Mon, 6 Aug 2001 20:17:46 -0500
Message-ID: <EPEHLKLEHAHLONFOKNHNMEOLDDAA.webmaster@robbyslaughter.com> (raw)
In-Reply-To: <3.0.5.32.20010806171753.009ea5c0@postoffice.pacbell.net>
Gonzo:
You need to make sure that you delimit your values correctly.
To insert text fields (which may contain spaces) use 'single
quotes'. You'll also want to enter date fields the same way.
So, you should try
INSERT INTO OP (op_num,op_name,start_time) VALUES
(5400,'Welding','06:00:00');
Of course, you're probably using the "time" data type, which means that
6:00:00 really means 6:00 in the morning!
Hope that helps!
-Robby
-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Gonzo Rock
Sent: Monday, August 06, 2001 7:18 PM
To: pgsql-sql@postgresql.org
Subject: [SQL] Simple Insert Problem
Sorry but this is making me crazy... yes... I'm way new to SQL
Why would this error out ??
This is the Query...
INSERT INTO OP (op_num,op_name,start_time) Values (5400,Welding,06:00:00);
And this is the pgSQL error...
ERROR: parser: parse error at or near ":"
The table has reasonable values in it already... I'm just adding a few more
rows by hand.
Thanks All,
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: webmaster@robbyslaughter.com, GonzoRock@Excite.com
Subject: RE: Simple Insert Problem
In-Reply-To: <EPEHLKLEHAHLONFOKNHNMEOLDDAA.webmaster@robbyslaughter.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox