Thanks Sim, a very usefull information.
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Sim Zacks
Sent: Wednesday, May 07, 2014 7:33 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Crosstab function
What I have done in the
G Johnston
Sent: Tuesday, May 06, 2014 11:01 AM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Crosstab function
Hengky Lie wrote
Hi David,
Are you sure that there is no pure sql solution for this ?
I think (with my very limited postgres knowledge), function can solve
this.
Which
: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Crosstab function
Hengky Lie wrote
> Hi David,
>
> Are you sure that there is no pure sql solution for this ?
>
> I think (with my very limited postgres knowledge), function can solve
> this.
>
> Which is the column header
Hengky Lie wrote
> Hi David,
>
> Are you sure that there is no pure sql solution for this ?
>
> I think (with my very limited postgres knowledge), function can solve
> this.
>
> Which is the column header I need but I really have no idea how to use
> this
> as column header.
>
> Anyway, If i c
, 2014 7:49 PM
To: Hengky Liwandouw
Cc: pgsql-general General
Subject: Re: [GENERAL] Crosstab function
> Are you sure that there is no pure sql solution for this ?
There is no pure SQL solution because a SQL query always gives a fixed number
of columns. You could compose the SQL in your client
n (Windev) and send the fixed sql to the server
>
> Thanks
>
>
>
>
> -Original Message-
> From: pgsql-general-ow...@postgresql.org
> [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of David G Johnston
> Sent: Monday, May 05, 2014 10:25 PM
> To: pgsql
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of David G Johnston
Sent: Monday, May 05, 2014 10:25 PM
To: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Crosstab function
Hengky Lie wrote
> The crosstab warehouse column name (OFFICE & St
Hengky Lie wrote
> The crosstab warehouse column name (OFFICE & Store2) is taken from
> tblwarehouse so when user add warehouse, crosstab column name will change
> automatically. And also each row has total qty.
In what programming language? The only way to do this is to dynamically
construct the
Hi Friends,
Could somebody help me with crosstab function ? I have warehouse table:
CREATE TABLE tblwarehouse (
id integer NOT NULL,
warehousename character varying(20)
);
COPY tblwarehouse (id, warehousename) FROM stdin;
2 OFFICE
3 STORE2
\.
And product tabl
That did it.It's the smallest things that always kill you.
Thanks
Sim
On 12/14/2010 05:00 PM, Filip Rembiałkowski wrote:
http://www.postgresql.org/docs/8.4/interactive/tablefunc.html says:
The |crosstab| function produces one output row for each
consecutive group of input rows wit
http://www.postgresql.org/docs/8.4/interactive/tablefunc.html says:
> The crosstab function produces one output row for each consecutive group
> of input rows with the same row_name value. It fills the output valuecolumns,
> left to right, with the
> value fields from these rows. If there are fe
Just to clarify, there aren't duplicate rows. But if the customer
purchased two products there are 2 rows for that customer, one with the
quantity sum filled in for the first product and the second row with the
quantity sum filled in for the second product. I want one customer row
with all the
I rechecked and with products as columns it has duplicate customers. My
goal is one row per customer with the sum of quantity filled in for each
product they purchased.
create table customers(customerid serial primary key, customername text);
create table products(productid serial primary key,
please show
- source data structures (in form of CREATE TABLE please)
- actual whole query that creates duplicates
2010/12/14 Sim Zacks
> postgres 8.2.17
>
> I am trying out the crosstab function (tablefunc contrib) for reporting
> needs and I'm having a problem.
> I have customers and pro
postgres 8.2.17
I am trying out the crosstab function (tablefunc contrib) for reporting
needs and I'm having a problem.
I have customers and products and the data is the quantity purchased. I
am grouping by customername, productname in the source sql. My category
sql depends if I want the prod
pardon,
correct link
http://okbob.blogspot.com/2008/08/using-cursors-for-generating-cross.html
pavel
2010/1/13 Pavel Stehule :
> Hello
>
> 2010/1/12 Daniel Schuchardt :
>> Hy,
>>
>> i'm looking for a solution to get this table dynamicaly in that resultset:
>>
>> SELECT r_dbrid, r_kategorie AS c
Hello
2010/1/12 Daniel Schuchardt :
> Hy,
>
> i'm looking for a solution to get this table dynamicaly in that resultset:
>
> SELECT r_dbrid, r_kategorie AS column_name, r_descr AS value FROM
> recnokeyword WHERE r_dbrid=X
> r_dbrid | r_kategorie | r_descr
> --+-+
See bottom.
Am 12.01.2010 22:00, schrieb Merlin Moncure:
On Tue, Jan 12, 2010 at 3:27 PM, Daniel Schuchardt
wrote:
Hy,
i'm looking for a solution to get this table dynamicaly in that resultset:
SELECT r_dbrid, r_kategorie AS column_name, r_descr AS value FROM
recnokeyword WHERE r_dbrid=
On Tue, Jan 12, 2010 at 3:27 PM, Daniel Schuchardt
wrote:
> Hy,
>
> i'm looking for a solution to get this table dynamicaly in that resultset:
>
> SELECT r_dbrid, r_kategorie AS column_name, r_descr AS value FROM
> recnokeyword WHERE r_dbrid=X
> r_dbrid | r_kategorie | r_descr
> --+
Hy,
i'm looking for a solution to get this table dynamicaly in that resultset:
SELECT r_dbrid, r_kategorie AS column_name, r_descr AS value FROM
recnokeyword WHERE r_dbrid=X
r_dbrid | r_kategorie | r_descr
--+-+
14725737 |material | Alu Sorte1
14725737 |far
Hi,
I am having problem using the
crosstab function ( which is under the contrib/tablefunc directory). I have
installed the tablefunc module and also installed the functions into my
DB.
I am using postgresql 7.4 beta
version.
I am issuing the following query,
select *from crosstab('s
21 matches
Mail list logo