How would i go by creating this query?

lgalumbres

New member
Local time
Today, 17:13
Joined
Oct 19, 2004
Messages
5
Hello everyone,

I have two tables, Reinvests and Trades:

Reinvests table has the following fields:
- Portfolio Code
- Tran Code
- Security Symbol
- Trade Date
- Settle Date
- Quantity
- Amount
- mgr#

Trades table has the following fields:
- Portfolio Code - Start Date
- Tran Code
- Sec Type Code
- Security Symbol
- Trade Date
- Settle Date
- Quantity
- Amount
- mgr#
- FA#
- prgm

I basically need to create a query that only produce records where only records are returned for which do not have a matching "dv" Trans Code vs. "by" Trans Code. For example, IF dv.account=by.account AND IF dv.tradedate=by.tradedate AND IF dv.symbol=by.symbol THEN its ignored for the data collection.

Any help would be great... thanks......
 
What if you try to make a query with three additional fields using the expression builder:

Expr1: [dv]![account]=[by]![account]
Expr2: [dv]![tradedate]=[by]![tradedate]
Expr3: [dv]![symbol]=[by]![symbol]

Back in the design view:

Under Expr1 set the criteria (first line) to 0 (blank for second and third line)
Under Expr2 set the criteria (second line) to 0 (blank for first and third line)
Under Expr3 set the criteria (third line) to 0 (blank for first and second line)

Hope that helps
 

Users who are viewing this thread

Back
Top Bottom