on 08-29-2006 7:21 AM
Hi All,
Is it possible to manipulate(add, subtract,...) two fields belonging to two different tables in a SELECT query or JOIN statement.
Ex.
SELECT
<TABLE1>~<FIELD1>
<TABLE1>~<FIELD2>
<TABLE2>~<FIELD1>
<TABLE1>~<FIELD2>
INTO TABLE
<RESULT_TAB>
FROM
<TABLE1>
INNER JOIN
<TABLE2>
ON
<TABLE1>~<FIELD1> = <TABLE2>~<FIELD1> ...
My problem is, while selecting can i add or subtract two fields say <TABLE1><FIELD1> and <TABLE2><FIELD1>.
Regards,
Mustajab.
Hi Mustajab!
IMHO you can't manipulate two fields during the select (in open SQL).
If you are interested in sums (or differences) over all entries, then you can use the aggregation function SUM and make the final calculation with the total of the columns - but not line by line.
Regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.