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 ord
> 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 (pro
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.
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 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.)
Find the file tablefunc.sql and redirect it into your database, e.g.
psql mydatabase <
On Fri, 28 Jan 2005 08:34:27 -0800, Joe Conway <[EMAIL PROTECTED]> wrote:
> Alexandre Leclerc wrote:
> >Here a normal listing of design.product_department_time:
> > product_id | department_id | req_time
> >+---+--
> >906 | A |
Alexandre Leclerc 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 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, Alexand
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_dep
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 do
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
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
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
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
> >
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
> > +---
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 t
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 |
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
Good morning,
I have a table that links two tables and I need to flatten one.
(Please, if I'm just not in the good forum for this, tell me. This is
a performance issue for me, but you might consider this as an SQL
question. Feel free to direct me at the good mailling-list.)
design.products ---> d
19 matches
Mail list logo