Re: [SQL] cartesian product

2007-02-19 Thread Luiz K. Matsumura
Hi, Salman Maybe this isn't so much elegant, but works: SELECT p1.sequence as sequence1, p2.sequence as sequence2 FROM potential_pairs p1, potential_pairs p2 WHERE p1.sequence <= p2.sequence Hope this helps Salman Tahir wrote: Hi, I have a query regarding an SQL statement I'm trying to exec

Re: [SQL] cartesian product

2007-02-19 Thread Scott Marlowe
On Mon, 2007-02-19 at 10:58, Salman Tahir wrote: > Hi, > > I have a query regarding an SQL statement I'm trying to execute. I > have the following table: > > sequence > -+ > AK > AKCMK > CMKA > > I execute the following statement (Cartesian product): > > SELECT p1.sequence as sequen

Re: [SQL] cartesian product

2007-02-19 Thread Scott Marlowe
On Mon, 2007-02-19 at 10:58, Salman Tahir wrote: > Hi, > > I have a query regarding an SQL statement I'm trying to execute. I > have the following table: > > sequence > -+ > AK > AKCMK > CMKA > > I execute the following statement (Cartesian product): > > SELECT p1.sequence as sequen

[SQL] cartesian product

2007-02-19 Thread Salman Tahir
Hi, I have a query regarding an SQL statement I'm trying to execute. I have the following table: sequence -+ AK AKCMK CMKA I execute the following statement (Cartesian product): SELECT p1.sequence as sequence1, p2.sequence as sequence2 FROM potential_pairs p1, potential_pairs p2 w