pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Christopher Smith <christopherl_smith@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: date and plpgsql error
Date: Thu, 13 Mar 2003 17:55:01 -0800 (PST)
Message-ID: <20030313175218.K74429-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <20030314013736.32799.qmail@web14107.mail.yahoo.com>

On Thu, 13 Mar 2003, Christopher Smith wrote:

> I am trying to insert a date into a table with type date.

> CREATE TABLE member_billing_info (
> userid varchar(30) primary key,
> creditcard_type varchar(30),
> creditcard_number varchar(50),
> ****exp_date date,
> first_name varchar(100),
> last_name varchar(100),
> street_address varchar(100),
> city varchar(100),
> state varchar(30),
> zip_code varchar(30),
> country varchar(100),
> phone_number varchar(30),
> email varchar(200),
> date_entered timestamp,
> last_update_time timestamp
> );

> CREATE or replace FUNCTION enrollpayee (character varying, integer,character varying, character varying,
>      text,character varying,character varying,character varying,
>      character varying,character varying,character varying,character varying,
>      character varying,character varying) RETURNS integer
>     AS 'DECLARE

>
> INSERT INTO member_billing_info
> values(strUserId,intPlanId,strCardType,cryptCreditCard,v_ExpDate,
> strFirstName,strLastName,strAddress,strCity,strState,
> strZipCode,strCountry,strPhone,strEmail,now(),now()); >

Umm, it seems to me that your insert is off on columns.  You're
inserting
 varchar, int, varchar, varchar, date, ...
into a table of
 varchar, varchar, varchar, date

I don't see an int anywhere in the table, so I'm not sure what you were
intending to do.




view thread (2+ messages)

Message-ID: <20030313175218.K74429-100000@megazone23.bigpanda.com>
Permalink:  ../20030313175218.K74429-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20030313175218.K74429-100000@megazone23.bigpanda.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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone23.bigpanda.com, christopherl_smith@yahoo.com
  Subject: Re: date and plpgsql error
  In-Reply-To: <20030313175218.K74429-100000@megazone23.bigpanda.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