getting sum of a duplicated record using sql
I have a table that stores income and expenditure. every time an entry is made, it is saved independently in the table so as to be able to track every income or expenditure entered. i would want to get a list of all incomes and expenditure saved in the table with the sum without repeating any record. am using vb6 and ms access, i would like appreciate your help.
Re: getting sum of a duplicated record using sql
Moved From the FAQ Section
Re: getting sum of a duplicated record using sql
Why would there be repeating records?
-tg
Re: getting sum of a duplicated record using sql
He probably did a join which result in columns from one table being repeated...depash, post you current SQL query.
Re: getting sum of a duplicated record using sql
selectRecord.Open "SELECT account, drcr from tbl_incomestmt where IncomeDate between #" & f & "# and #" & t & "# and acc_period_id = " & activeAccountingPeriod & " order by tbl_incomestmt.head_no;", Cn
Set rpt_incomestmt.DataSource = selectRecord
The records are repeated becease every time an entry is made, it is saved in the table and not updating any record. the same case which happens when a customer buys items in a shop using a POS, this will help me to view all sales per day and whichever day they want