pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Anna Langer <anna_langer@hotmail.com>
To: pgsql-interfaces@postgreSQL.org
Subject: Questions about INSERT INTO!
Date: Tue, 25 May 1999 00:54:52 PDT
Message-ID: <19990525075452.36056.qmail@hotmail.com> (raw)

Hi!

Thanks for all help. It worked very well.

We still have some problems with inserting a datetime into the database.

If we write like this the database accept it:

PQexec(conn, "INSERT INTO test VALUES('23/01/1999 12:03:30');


When we are inserting other values in the database we write like this:

sprintf(command, "INSERT INTO octets VALUES(%d, %d)", a, b);

Now we wonder if we can put the date in to the database in the same way that 
we did with the integers? We have tried to make the date to a string, but it 
doesn't take it. The errormessage say that the database is of type datetime 
and the string is of type int4.

Is there anyone who can help us with this?

Thanks!

Anna and Maria


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com



view thread (2+ messages)  latest in thread

Message-ID: <19990525075452.36056.qmail@hotmail.com>
Permalink:  ../19990525075452.36056.qmail@hotmail.com/
Also on:    postgresql.org/message-id/19990525075452.36056.qmail@hotmail.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-interfaces@postgresql.org
  Cc: anna_langer@hotmail.com
  Subject: Re: Questions about INSERT INTO!
  In-Reply-To: <19990525075452.36056.qmail@hotmail.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