Using one value for calculation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I need to get one value from a table, join it with an other table and use it
in a qry.
example:

table one
idone : description : price
------------------------------
1 : test : 10
2 : test : 20

table two
idexcost : cost
------------------
1 : 20

the qry
idone : description : price : price + cost
------------------------------------------------
1 : test : 10 : 30
2 : test : 20 : 40

The tables have no relation with each other
I'm not sure how to do this is sql

Can you help me?


Steve
 
Hi Steve,

----
Select idone,
[description],
price,
'price+cost'=price+cost
From [Table One]
Cross Join
[Table Two]
----

result

idone description price price+cost
----------- ----------- ---------- -----------
1 Test 10.00 30.00
2 Test 20.00 40.00


Bye
Giorgio
 
Back
Top