On 6/2/2010 2:52 PM, Wes James wrote:
>
> **snip***
> Thx it is closer (with an end in the case):
>
> select
> case when MAX(page_count_count) - MIN(page_count_count)> 0 then
> MAX(page_count_count) - MIN(page_count_count)
> else
> MAX(page_count_count)
> end as day_max
> from pa
On Wed, Jun 2, 2010 at 1:51 PM, Plugge, Joe R. wrote:
> This is discussed in this Wiki:
>
>
> http://wiki.postgresql.org/wiki/Grouping_Sets
>
This would sum the results and would be incorrect. I also get this error:
select sum(page_count_count), page_count_pdate from page_count group
by rollup(
On Wed, Jun 2, 2010 at 2:44 PM, Justin Graf wrote:
> On 6/2/2010 12:31 PM, Wes James wrote:
>> On Wed, Jun 2, 2010 at 10:55 AM, Oliveiros
>> wrote:
>>
>>> Hi,
>>> Have you already tried this out?
>>>
>>> select MAX(page_count_count) - MIN(page_count_count) from page_count group
>>> by page_coun
This is discussed in this Wiki:
http://wiki.postgresql.org/wiki/Grouping_Sets
-Original Message-
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] On
Behalf Of Hiltibidal, Rob
Sent: Wednesday, June 02, 2010 12:06 PM
To: Oliveiros; Wes James; pgsql-sql@postgr
hi Louis-David,
tmp := nextval('cabin_type_id_cabin_type_seq');
seems to me you're adding a newly created key value (for which there
isn't a record yet).
--
regards, jr. (j...@tailorware.org.uk)
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscri
hi Anton,
works fine if you write:
create or replace function get_rec (in p_id test.id%TYPE) returns test as $$
--
regards, jr. (j...@tailorware.org.uk)
--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsq
Hello, All!
I've tried to do following:
create table test ( id BIGSERIAL NOT NULL, constraint pk_test primary
key (id),
val BIGINT NOT NULL
);
create or replace function get_rec (in p_id test.id%TYPE) returns test
%ROWTYPE as $$
declare
retv
Hi,
2010/5/27 Tom Lane :
> Harrie Rodenbach writes:
>> = oratest=# select odbclink.query(1, 'SELECT * FROM mytable') as
>> result(id int4, t text, d decimal); = ERROR: syntax error at or near
>> "(" = LINE 1: ...bclink.query(1, 'SELECT * FROM mytable') as
>> result(id int4, ...
>
> You need t
Hi,
We are trying to make use of module ODBC-link. We follow the
instructions as read in README.TXT, including the given examples.
Connecting to an external Oracle database and running a query using unixODBC is
successful:
==
db2 has a group by rollup function.. does this exist in postgres?
-Original Message-
From: pgsql-sql-ow...@postgresql.org
[mailto:pgsql-sql-ow...@postgresql.org] On Behalf Of Oliveiros
Sent: Wednesday, June 02, 2010 11:55 AM
To: Wes James; pgsql-sql@postgresql.org
Subject: Re: [SQL] how to
On 6/2/2010 12:31 PM, Wes James wrote:
> On Wed, Jun 2, 2010 at 10:55 AM, Oliveiros
> wrote:
>
>> Hi,
>> Have you already tried this out?
>>
>> select MAX(page_count_count) - MIN(page_count_count) from page_count group
>> by page_count_pdate.
>>
>>
>> Best,
>> Oliveiros
>>
> Oliveiros,
On Wed, Jun 2, 2010 at 10:55 AM, Oliveiros
wrote:
> Hi,
> Have you already tried this out?
>
> select MAX(page_count_count) - MIN(page_count_count) from page_count group
> by page_count_pdate.
>
>
> Best,
> Oliveiros
Oliveiros,
Thx that mostly works. I just tried it and on the days there is on
Hi,
Have you already tried this out?
select MAX(page_count_count) - MIN(page_count_count)
from page_count
group by page_count_pdate.
Best,
Oliveiros
- Original Message -
From: "Wes James"
To:
Sent: Wednesday, June 02, 2010 5:48 PM
Subject: [SQL] how to construct sql
I am gra
I am grabbing a printer total and putting it in a table. The
page_count is continuously increasing:
page_count_countpage_count_pdate
10 2010-05-10
20 2010-05-10
40 2010-05-11
60
14 matches
Mail list logo