Alexandre Leclerc wrote:
Sorry for jumping in on this thread so late -- I haven't been able to
select * from crosstab(
'select product_id, department_id, req_time
from product_department_time order by 1',
'select ''A'' union all select ''C'' union all select ''D'''
) as
On Fri, 4 Feb 2005 12:48:43 -0500, Merlin Moncure
[EMAIL PROTECTED] wrote:
Alexandre Leclerc wrote:
Sorry for jumping in on this thread so late -- I haven't been able to
select * from crosstab(
'select product_id, department_id, req_time
from product_department_time order by 1',
On Thu, 27 Jan 2005 12:43:56 -0500, Alexandre Leclerc
[EMAIL PROTECTED] wrote:
On Thu, 27 Jan 2005 17:27:40 +0100, Dawid Kuroczko [EMAIL PROTECTED] wrote:
On Thu, 27 Jan 2005 10:23:34 -0500, Alexandre Leclerc
[EMAIL PROTECTED] wrote:
Here a normal listing of design.product_department_time:
On Fri, 28 Jan 2005 09:07:59 +0100, Dawid Kuroczko [EMAIL PROTECTED] wrote:
On Thu, 27 Jan 2005 12:43:56 -0500, Alexandre Leclerc
[EMAIL PROTECTED] wrote:
On Thu, 27 Jan 2005 17:27:40 +0100, Dawid Kuroczko [EMAIL PROTECTED]
wrote:
On Thu, 27 Jan 2005 10:23:34 -0500, Alexandre Leclerc
On Fri, 28 Jan 2005 10:24:37 -0800, Joe Conway [EMAIL PROTECTED] wrote:
Alexandre Leclerc wrote:
I'm a little bit confused on how to install this contirb. I know my
contrib package is installed, but I don't know how to make it work in
postgresql. (Using 7.4.5-1mdk on Mandrake Linux.)
Alexandre wrote:
Here a normal listing of design.product_department_time:
product_id | department_id | req_time
+---+--
906 | A | 3000
906 | C | 3000
906 | D | 1935
907 | A
On Thu, 27 Jan 2005 10:23:34 -0500, Alexandre Leclerc
[EMAIL PROTECTED] wrote:
Here a normal listing of design.product_department_time:
product_id | department_id | req_time
+---+--
906 | A | 3000
906 | C | 3000
Unfortunately we will need a rowtype with all the departaments:
CREATE DOMAIN departaments AS (a int, b int, c int, d int, ...);
I think you mean CREATE TYPE departments...
Chris
---(end of broadcast)---
TIP 2: you can get off all lists at once with
On Thu, 27 Jan 2005 17:27:40 +0100, Dawid Kuroczko [EMAIL PROTECTED] wrote:
On Thu, 27 Jan 2005 10:23:34 -0500, Alexandre Leclerc
[EMAIL PROTECTED] wrote:
Here a normal listing of design.product_department_time:
product_id | department_id | req_time
+---+--
On Thu, 27 Jan 2005 10:44:45 -0500, Merlin Moncure
[EMAIL PROTECTED] wrote:
Alexandre wrote:
Here a normal listing of design.product_department_time:
product_id | department_id | req_time
+---+--
906 | A | 3000
906 | C
Alexandre wrote:
On Thu, 27 Jan 2005 10:44:45 -0500, Merlin Moncure
[EMAIL PROTECTED] wrote:
Alexandre wrote:
ok, you have a couple of different options here. The first thing
that
jumps out at me is to use arrays to cheat using arrays.
Let's start with the normalized result set.
On Thu, 27 Jan 2005 13:02:48 -0500, Merlin Moncure
[EMAIL PROTECTED] wrote:
Alexandre wrote:
On Thu, 27 Jan 2005 10:44:45 -0500, Merlin Moncure
[EMAIL PROTECTED] wrote:
Alexandre wrote:
Let's start with the normalized result set.
product_id | department_id| sum
924
Alexandre wrote:
Right. I expanding departments into columns is basically a dead
end.
First of all, SQL is not really designed to do this, and second of
all
(comments continued below)
Ok, I got it. The basic message is to avoid making columns out of rows
yes. This is wrong.
like
On Thu, 27 Jan 2005 16:05:09 -0500, Merlin Moncure
[EMAIL PROTECTED] wrote:
Alexandre wrote:
like I'm doing right now, that de-normalizing in an array is the way
to go.
Only sometimes. Looping application code is another tactic. There may
be other things to do as well that don't involve
14 matches
Mail list logo