On 04/14/10 08:33, Feixiong Li wrote:
Hi , guys ,
I am newbie for sql, I have a problem when using max() function, I need
get null when there are null in the value list, or return the largest
value as usual, who can do this?
i.e. max([1,2,3,4,5]) = 5
max([1,2,3,4,5,null]) = null
if u want a
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 INTEGER NOT NULL,
t
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.poste_idposte = 275, not the null ones.
HTH
Best,
Oliveiros
- Original Message -
On Wed, Apr 21, 2010 at 7:25 AM, Gonzalo Aguilar Delgado
gagui...@aguilardelgado.com wrote:
Hi Tom,
This is a select query. I don't think that's the right error message.
Yes, but IS the correct error message.
The query being complained of appears to be a generated foreign key
checking
Scott Marlowe scott.marl...@gmail.com writes:
On Wed, Apr 21, 2010 at 7:25 AM, Gonzalo Aguilar Delgado
gagui...@aguilardelgado.com wrote:
Maybe but I ran even grant all on schema public for this user to check
if this was the problem.
That doesn't do what you think it does. You need to grant
In article 987929295d1345b5bce249f42730c...@marktestcr.marktest.pt,
Oliveiros oliveiros.crist...@marktest.pt 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
Hi Tom,
This may be a clue... Will check
El mié, 21-04-2010 a las 11:23 -0400, Tom Lane escribió:
Scott Marlowe scott.marl...@gmail.com writes:
On Wed, Apr 21, 2010 at 7:25 AM, Gonzalo Aguilar Delgado
gagui...@aguilardelgado.com wrote:
Maybe but I ran even grant all on schema public for
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