pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Davis <mdavis@sevainc.com>
To: 'juerg.rietmann@pup.ch' <juerg.rietmann@pup.ch>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: RE: no value for numeric filed in SQL statement causes an error
Date: Wed, 31 Jan 2001 09:20:56 -0700
Message-ID: <01C08B67.21B84270.mdavis@sevainc.com> (raw)

Try: 

insert into table (name,id,city) values ('roger rabbit',NULL,'carrot city')


-----Original Message-----
From:	juerg.rietmann@pup.ch [SMTP:juerg.rietmann@pup.ch]
Sent:	Wednesday, January 31, 2001 7:16 AM
To:	pgsql-sql@postgresql.org
Subject:	no value for numeric filed in SQL statement causes an error

Hi there

I have a table with char and int fields. From my form  I get no values back
for int fields when they are left blank. This causes the SQL insert to
fail.

field     type
name char
id   int2
city char

insert into table (name,id,city) values ('roger rabbit',,'carrot city')

The default for int/float fields is 0. Since I reuse the code of the
referring page I don't like to have all fields assigned 0 at the beginning.

Who can help ???

Thanks ... jr

============================================
PFISTER + PARTNER, SYSTEM - ENGINEERING AG
Juerg Rietmann
Grundstrasse 22a
6343 Rotkreuz
Switzerland

phone: +4141 790 4040
fax: +4141 790 2545
mobile: +4179 211 0315
============================================




view thread (4+ messages)

Message-ID: <01C08B67.21B84270.mdavis@sevainc.com>
Permalink:  ../01C08B67.21B84270.mdavis@sevainc.com/
Also on:    postgresql.org/message-id/01C08B67.21B84270.mdavis@sevainc.com

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: mdavis@sevainc.com, juerg.rietmann@pup.ch
  Subject: Re: no value for numeric filed in SQL statement causes an error
  In-Reply-To: <01C08B67.21B84270.mdavis@sevainc.com>
  References: <01C08B67.21B84270.mdavis@sevainc.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