Simple Postgresql procedure

Concluído Postado Apr 22, 2009 Pago na entrega
Concluído Pago na entrega

I've got a PostGresql database. The database contains a Datasets table and an Observations table: ================== CREATE TABLE Datasets ( datasetId SERIAL NOT NULL , name CHAR(10) NOT NULL , startTime TIMESTAMP , endTime TIMESTAMP , PRIMARY KEY (datasetId) ); CREATE TABLE Observations ( observationId SERIAL NOT NULL , time TIMESTAMP NOT NULL , observation VARCHAR(10) NOT NULL , datasetId INTEGER NOT NULL , PRIMARY KEY (observationId) , CONSTRAINT FK_Observations_1 FOREIGN KEY (datasetId) REFERENCES Datasets (datasetId) ); ================== When viewing the list of datasets I want to quickly see the time periods they cover. I believe calculating this afresh each time would be too time consuming. Thus, I'd like a procedure that can be run to populate the 'start time' and 'end time' fields of the parent dataset with the time period covered by child items in that dataset.

## Deliverables

Single PostgresQL query, with instruction on how to load and run it via the PGAdmin III interface.

## Platform

Windows XP

Administração de Bancos de Dados MySQL SQL

ID do Projeto: #3828002

Sobre o projeto

2 propostas Projeto remoto Ativo em Apr 22, 2009

Concedido a:

tommottom

See private message.

$15 USD em 3 dias
(46 Comentários)
5.6

2 freelancers estão ofertando em média $50 nesse trabalho

flashandphpgurus

See private message.

$85 USD in 3 dias
(6 Comentários)
2.9