[SQL] sub-select parameter problem

2004-06-10 Thread Philippe Lang
Hello, Imagine the following query: --- SELECT tableA.field1, tableA.field2, tableB.field1, tableB.field2, ( SELECT tableC.field2 FROM tableC WHERE tableC.field1 = tableB.field1 - 1; ) AS p FROM tableA INNER JOIN tableB ON tabl

Re: [SQL] sub-select parameter problem

2004-03-04 Thread Richard Huxton
On Thursday 04 March 2004 11:20, Philippe Lang wrote: [working query] > It works fine. Excellent! :-) Oh - there's more :-( > Now, I need to do something else: the parameter of my sub-select is also > a member of the table I'm selecting. > > SELECT > > tableA.field1, > tableA.field2, > > t

Re: [SQL] sub-select parameter problem

2004-03-04 Thread Christoph Haller
> > Hello, > > Imagine the following query: > > --- > SELECT > > tableA.field1, > tableA.field2, > =20=20 > tableB.field1, > tableB.field2, > > ( > SELECT tableC.field2 > FROM tableC > WHERE tableC.field1 =3D tableB.field1 - 1; >