no matching field for 1-many relationship and erratic query

G

Guest

i have three tables
table1
fields, branch code (number) PK
branch name (text)
table 2
fields, branchcode (number)
branchmoney (currency)
depositer (text)
date (date)
table 3
fields branchcode (number)
expences (currency)
item (text)
date (date)
table4 branchcode (number)
bankacc# (number)
deposit (currency)
withdraw (currency)
date (date/time)
these tables are in such a way except table one i could not have an primary
key but all have generated keys,
table1 is only can have one to many with all tables
such relation ship causing wrong calculations sums in query
HOW establish a chain of 1 to many between tables to get anfair sum in query
at present by using all the tables in the QBE query is resulting the GROUPBY
/ sum with the table having maximum number of rows
hence a table with single row of records will be repeted many times as the
highest number of times of the table having maximum rows how to come over
such problom please.
 
B

Bob Quintal

i have three tables
table1
fields, branch code (number) PK
branch name (text)
table 2
fields, branchcode (number)
branchmoney (currency)
depositer (text)
date (date)
table 3
fields branchcode (number)
expences (currency)
item (text)
date (date)
table4 branchcode (number)
bankacc# (number)
deposit (currency)
withdraw (currency)
date (date/time)
these tables are in such a way except table one i could not
have an primary key but all have generated keys,
table1 is only can have one to many with all tables
such relation ship causing wrong calculations sums in query
HOW establish a chain of 1 to many between tables to get
anfair sum in query
at present by using all the tables in the QBE query is
resulting the GROUPBY / sum with the table having maximum
number of rows
hence a table with single row of records will be repeted many
times as the
highest number of times of the table having maximum rows how
to come over such problom please.

Build separate queries to sum the currency from each table then
put the 3 queries into a fourth query. Use left joins from
Table1 to the 3 queries here.
 

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