pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ragnar Hafstaư <gnari@simnet.is>
To: Henry Ortega <juandelacruz@gmail.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: insert only if conditions are met?
Date: Wed, 31 Aug 2005 16:44:58 +0000
Message-ID: <1125506698.2605.22.camel@localhost.localdomain> (raw)
In-Reply-To: <2bffcc3305083108497ea6dcc6@mail.gmail.com>
References: <2bffcc33050831080942f806e1@mail.gmail.com>
	<20050831152534.GA18934@winnie.fuhr.org>
	<2bffcc3305083108487fb80cb2@mail.gmail.com>
	<2bffcc3305083108497ea6dcc6@mail.gmail.com>

On Wed, 2005-08-31 at 11:49 -0400, Henry Ortega wrote:
> What I am trying to do is
> * Insert a record for EMPLOYEE A to TABLE A 
> IF
> the sum of the hours worked by EMPLOYEE A on TABLE A
> is not equal to N
> 
> Is this possible?

Sure, given a suitable schema

It is not clear to me, if the hours worked are
to be found in the same table you want to insert
into, or not.

gnari






view thread (14+ messages)  latest in thread

Message-ID: <1125506698.2605.22.camel@localhost.localdomain>
Permalink:  ../1125506698.2605.22.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1125506698.2605.22.camel@localhost.localdomain

 · 

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: gnari@simnet.is, juandelacruz@gmail.com
  Subject: Re: insert only if conditions are met?
  In-Reply-To: <1125506698.2605.22.camel@localhost.localdomain>

* 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