Re: [SQL] LEFT OUTER JOIN issue

2010-04-22 Thread Arne Stölck
Le Wed, 21 Apr 2010 11:06:25 +0200, Thomas BOURIMECH a écrit : > Hi everyone, here is my problem : > > I got two tables : > > CREATE TABLE "public"."calendar_temp" ( > "id" SERIAL, > "dat" DATE, > "heur" TIME WITHOUT TIME ZONE, > CONSTRAINT "calendar_temp_pkey" PRIMARY KEY("id") > ) WI

Re: [SQL] LEFT OUTER JOIN issue

2010-04-22 Thread Lennin Caro
--- On Wed, 4/21/10, Thomas BOURIMECH wrote: From: Thomas BOURIMECH Subject: [SQL] LEFT OUTER JOIN issue To: "'pgsql-sql@postgresql.org'" Date: Wednesday, April 21, 2010, 9:06 AM Hi  everyone, here is my problem :   I got two tables :  

[SQL] LEFT OUTER JOIN issue

2010-04-22 Thread Thomas BOURIMECH
Hi everyone, here is my problem : I got two tables : CREATE TABLE "public"."calendar_temp" ( "id" SERIAL, "dat" DATE, "heur" TIME WITHOUT TIME ZONE, CONSTRAINT "calendar_temp_pkey" PRIMARY KEY("id") ) WITHOUT OIDS; CREATE TABLE "public"."h_part" ( "idh" SERIAL, "poste_idposte" INTE

Re: [SQL] LEFT OUTER JOIN issue [SOLVED]

2010-04-22 Thread Thomas BOURIMECH
Thankx everybody It worked... -Message d'origine- De : Oliveiros [mailto:oliveiros.crist...@marktest.pt] Envoyé : mercredi 21 avril 2010 15:42 À : Thomas BOURIMECH; pgsql-sql@postgresql.org; Oliveiros Objet : Re: [SQL] LEFT OUTER JOIN issue Try moving the hp.poste_idposte=275 insid

Re: [SQL] LEFT OUTER JOIN issue

2010-04-21 Thread Jayadevan M
Hi, > SELECT ct.dat,ct.heur,hp.datmesure,hp.heuremesure,hp.t FROM calendar_temp as ct > LEFT OUTER JOIN h_part as hp > ON ct.dat = hp.datmesure > AND ct.heur = hp.heuremesure > WHERE > hp.poste_idposte = 275 > ORDER BY ct.dat, ct.heur > dat heur datmesure heu

Re: [SQL] LEFT OUTER JOIN issue

2010-04-21 Thread Harald Fuchs
In article <987929295d1345b5bce249f42730c...@marktestcr.marktest.pt>, "Oliveiros" writes: > Hi, Thomas. > I believe it is because of your WHERE clause, which is filtering out the nulls > from hp table. > According to > WHERE > hp.poste_idposte = 275 > You only want registers that have hp.post

Re: [SQL] LEFT OUTER JOIN issue

2010-04-21 Thread Oliveiros
, ct.heur And drop the WHERE clause. See if it gives the results you intended. Best, Oliveiros - Original Message - From: Oliveiros To: Thomas BOURIMECH ; pgsql-sql@postgresql.org Sent: Wednesday, April 21, 2010 1:53 PM Subject: Re: [SQL] LEFT OUTER JOIN issue Hi

Re: [SQL] LEFT OUTER JOIN issue

2010-04-21 Thread Oliveiros
- From: Thomas BOURIMECH To: 'pgsql-sql@postgresql.org' Sent: Wednesday, April 21, 2010 1:29 PM Subject: [SQL] LEFT OUTER JOIN issue Hi everyone, here is my problem : I got two tables : CREATE TABLE "public"."calendar_temp" ( "id&quo

[SQL] LEFT OUTER JOIN issue

2010-04-21 Thread Thomas BOURIMECH
Hi everyone, here is my problem : I got two tables : CREATE TABLE "public"."calendar_temp" ( "id" SERIAL, "dat" DATE, "heur" TIME WITHOUT TIME ZONE, CONSTRAINT "calendar_temp_pkey" PRIMARY KEY("id") ) WITHOUT OIDS; CREATE TABLE "public"."h_part" ( "idh" SERIAL, "poste_idposte" INTE