RE: Simple Insert Problem - Mailing list pgsql-sql

From Robby Slaughter
Subject RE: Simple Insert Problem
Date
Msg-id EPEHLKLEHAHLONFOKNHNMEOLDDAA.webmaster@robbyslaughter.com
Whole thread Raw
In response to Simple Insert Problem  (Gonzo Rock <GonzoRock@Excite.com>)
List pgsql-sql
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



pgsql-sql by date:

Previous
From: "Josh Berkus"
Date:
Subject: Re: Simple Insert Problem
Next
From: GonzoRock@excite.com
Date:
Subject: RE: Simple Insert Problem