Add two fieleds in a query

G

Guest

I have two fields in my query from 2 seprate tables. I want to add a 3rd
field (I will will manually) by mutilpling the two other tables.
Example:

Table 1 Table 2
Effective Date Price Shares

I want to multiply the two above tables and add the results into my other
field that I am naming Effective Date Amount.

How can I do this in a query?
 
G

Guest

Use a Calculated field. In the Field Name row of the query builder

Effective Date Amount: [Effective Date Price] * [Shares]
 
G

Guest

Here is what my two fields look like in the query
Effective Date Price: UVAL_AMT
and
Shares: BUY_SELL_UNIT_CT
I am doing the following..Effective Date Amount: [BUY_SELL_UNIT_CT]*[UVAL_AMT]

and I am getting an error stating..
The UVAL_AMT field could refer to more than one table in my SQL clause.
Anyone know why I am getting this error?

Thank you

Klatuu said:
Use a Calculated field. In the Field Name row of the query builder

Effective Date Amount: [Effective Date Price] * [Shares]

TKM said:
I have two fields in my query from 2 seprate tables. I want to add a 3rd
field (I will will manually) by mutilpling the two other tables.
Example:

Table 1 Table 2
Effective Date Price Shares

I want to multiply the two above tables and add the results into my other
field that I am naming Effective Date Amount.

How can I do this in a query?
 
G

Guest

Because the field name is in more than one table in the query.
Just put the name of the table in front of the field so it will know which
one you are referencing.

Effective Date Amount: [BUY_SELL_UNIT_CT]*[PutTableNameHere].[UVAL_AMT]


TKM said:
Here is what my two fields look like in the query
Effective Date Price: UVAL_AMT
and
Shares: BUY_SELL_UNIT_CT
I am doing the following..Effective Date Amount: [BUY_SELL_UNIT_CT]*[UVAL_AMT]

and I am getting an error stating..
The UVAL_AMT field could refer to more than one table in my SQL clause.
Anyone know why I am getting this error?

Thank you

Klatuu said:
Use a Calculated field. In the Field Name row of the query builder

Effective Date Amount: [Effective Date Price] * [Shares]

TKM said:
I have two fields in my query from 2 seprate tables. I want to add a 3rd
field (I will will manually) by mutilpling the two other tables.
Example:

Table 1 Table 2
Effective Date Price Shares

I want to multiply the two above tables and add the results into my other
field that I am naming Effective Date Amount.

How can I do this in a query?
 
G

Guest

Perfect THANK YOU!

Klatuu said:
Because the field name is in more than one table in the query.
Just put the name of the table in front of the field so it will know which
one you are referencing.

Effective Date Amount: [BUY_SELL_UNIT_CT]*[PutTableNameHere].[UVAL_AMT]


TKM said:
Here is what my two fields look like in the query
Effective Date Price: UVAL_AMT
and
Shares: BUY_SELL_UNIT_CT
I am doing the following..Effective Date Amount: [BUY_SELL_UNIT_CT]*[UVAL_AMT]

and I am getting an error stating..
The UVAL_AMT field could refer to more than one table in my SQL clause.
Anyone know why I am getting this error?

Thank you

Klatuu said:
Use a Calculated field. In the Field Name row of the query builder

Effective Date Amount: [Effective Date Price] * [Shares]

:

I have two fields in my query from 2 seprate tables. I want to add a 3rd
field (I will will manually) by mutilpling the two other tables.
Example:

Table 1 Table 2
Effective Date Price Shares

I want to multiply the two above tables and add the results into my other
field that I am naming Effective Date Amount.

How can I do this in a query?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top