Aloha,
I need to run a simple (SELECT * FROM tbl1 WHERE Col1=x) then use the single row that results from this query to perform math on another query. For example, the outer query could be SELECT tbl2.col4 * tbl1.col5 AS firstResult
Basically, tbl1 is full of numeric statistical weights that I need to use to multiply on the values in tbl2. the query on tbl1 will only ever return 1 row.
I would be perfectly happy joining the resulting tbl1 row to all returned tbl2 rows and then doing math, but I have no join values in the tables. I tried to add a '1' AS JoinID to both tables, but that didn’t work either.
Thanks guys,
Chris
First thing came to my mind was to use something like this:
if I’m getting your question right.