no value for numeric filed in SQL statement causes an error - Mailing list pgsql-sql

From juerg.rietmann@pup.ch
Subject no value for numeric filed in SQL statement causes an error
Date
Msg-id OFC467289F.E2BAB3B0-ONC12569E5.004DC356@pup.ch
Whole thread Raw
Responses Re: no value for numeric filed in SQL statement causes an error
List pgsql-sql
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
============================================



pgsql-sql by date:

Previous
From: Kovacs Baldvin
Date:
Subject: Number of tuples to fetch
Next
From: Michael Fork
Date:
Subject: Re: no value for numeric filed in SQL statement causes an error