My problem in simplified form is as follows:
Table 1: Objects (2 records)
Cube
Sphere
Table2: Object Properties (2 records)
Volume
SurfaceArea
I get a cross join,
Table3: Objects and Properties
Cube | Volume
Cube | Surface Area
Sphere | Volume
Sphere | Surface Area
Which is the result I want. I use it as an append query to populate a temp table.
My problem is, I actually don't have the source tables. These values differ from case to case. I solve the problem by creating temporary tables, which is extra work.
I would like to know if there's a way to provide a value list as a record source for SQL interpreter to process. I can do it with a single value, i.e this works:
but this doesn't work:
it is treated as if another field was introduced. Access converts the statement into
I'd like a way to pass these two values as if they were the record values, as opposed to field names, from an actual table.
Thx in advance.
Table 1: Objects (2 records)
Cube
Sphere
Table2: Object Properties (2 records)
Volume
SurfaceArea
Code:
SELECT Table1.Objects, Table2.ObjectProperties FROM Table1, Table2
Table3: Objects and Properties
Cube | Volume
Cube | Surface Area
Sphere | Volume
Sphere | Surface Area
Which is the result I want. I use it as an append query to populate a temp table.
My problem is, I actually don't have the source tables. These values differ from case to case. I solve the problem by creating temporary tables, which is extra work.
I would like to know if there's a way to provide a value list as a record source for SQL interpreter to process. I can do it with a single value, i.e this works:
Code:
SELECT Table1.Objects, "Volume" AS Exp1 FROM Table1
Code:
SELECT Table1.Objects, "Volume", "Surface" AS Exp1 FROM Table1
Code:
SELECT Table1.Objects, "Volume" AS Exp1, "Surface" AS Exp2 FROM Table1
Thx in advance.
Last edited: