2010/4/20 Pavel Stehule :
> Hello
>
> 2010/4/14 Feixiong Li :
>> 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?
>>
>
> max() returns max value of
El mar, 20-04-2010 a las 10:34 -0600, Scott Marlowe escribió:
> On Tue, Apr 20, 2010 at 10:32 AM, Gonzalo Aguilar Delgado
> wrote:
> >
> >> Hi Everyone,
> >>
> >> I've come along with a problem that appeared with latest version of
> >> Postgresql 8.4.2.
> >>
> >> I'm trying to insert a row in the
Gonzalo Aguilar Delgado writes:
>> 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 query. It's not surprising it would appear in the context
of an insert.
Feixiong Li wrote:
> 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
You can cheat a bit:
| tim=#
On Tue, Apr 20, 2010 at 10:32 AM, Gonzalo Aguilar Delgado
wrote:
>
>> Hi Everyone,
>>
>> I've come along with a problem that appeared with latest version of
>> Postgresql 8.4.2.
>>
>> I'm trying to insert a row in the analysis schema:
>>
>
> This is an insert query:
>
> Yes it is...
>
>
>> INSERT
> > Hi Everyone,
> >
> > I've come along with a problem that appeared with latest version of
> > Postgresql 8.4.2.
> >
> > I'm trying to insert a row in the analysis schema:
> >
>
> This is an insert query:
Yes it is...
>
> > INSERT INTO
> > "analisys"."response_quality"
> > ("uuid","id_su
On Wed, Apr 14, 2010 at 2:23 AM, Gonzalo Aguilar Delgado
wrote:
> Hi Everyone,
>
> I've come along with a problem that appeared with latest version of
> Postgresql 8.4.2.
>
> I'm trying to insert a row in the analysis schema:
>
This is an insert query:
> INSERT INTO
> "analisys"."response_qualit
Howdy, Feixiong.
I dunno if this results out of the box, but try something like this
SELECT CASE WHEN (COUNT(*) <> COUNT("YourColumnName")) THEN NULL ELSE
MAX("YourColumnName") END AS ""
FROM t_your_table;
I don't have an example table to test so this is "air code", but if you use
count
Hello
2010/4/14 Feixiong Li :
> 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?
>
max() returns max value of some column
create table foo(a int);
in
Hi Everyone,
I've come along with a problem that appeared with latest version of
Postgresql 8.4.2.
I'm trying to insert a row in the analysis schema:
INSERT INTO
"analisys"."response_quality"
("uuid","id_survey_question","id_survey","id_survey_status","id_shop","survey_question_response","id_s
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
thanks in advance!
Feixiong
feixion.
I'm working on a web app for a quality control checklist. I already
have a table set up, but I have a hunch that our model is sub-optimal
and I could get some better performance.I'm hoping someone on this
list can help me think clearly about how to express this efficiently
in SQL.
Each checklist h
Tom Lane wrote:
I think what Mario is actually complaining about is that partial unique
indexes are not part of the SQL standard, and he wants a solution that
at least gives the illusion that it might be portable to some other
RDBMS in the future.
Correct. As far as I can see there is no parti
13 matches
Mail list logo