pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ranieri Mazili <ranieri.oliveira@terra.com.br>
To: pgsql-general@postgresql.org
To: pgsql-sql@postgresql.org
Subject: Working with dates
Date: Thu, 05 Jul 2007 16:00:40 -0300
Message-ID: <468D3FD8.7070807@terra.com.br> (raw)

Hello,

I need to do the following select:

Number of days of month - weekends - holydays

So this query will return the number of days that people can work

Look that I have the holydays in one table, it's bellow:

CREATE TABLE holidays
(
  id_holidays serial NOT NULL,
  dt_holiday date,
  holiday_description character varying(60),
  input_date timestamp without time zone NOT NULL,
  CONSTRAINT holidays_pkey PRIMARY KEY (id_holidays)
)

I have no idea of how do it

If someone could help, I would appreciate.

Thanks



view thread (2+ messages)  latest in thread

Message-ID: <468D3FD8.7070807@terra.com.br>
Permalink:  ../468D3FD8.7070807@terra.com.br/
Also on:    postgresql.org/message-id/468D3FD8.7070807@terra.com.br

 · 

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: ranieri.oliveira@terra.com.br, pgsql-general@postgresql.org
  Subject: Re: Working with dates
  In-Reply-To: <468D3FD8.7070807@terra.com.br>

* 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