rowlandsfc
Active member
i have a database with multiple tables, i have created a sql select statement using 2 tables to make a calculation. the return works and displays the calculation correctly. what i need to do next is take the results of the calculations and save them back into the correct table. my other question is that with my query it makes the calculations for the active accounts but there is also inactive accounts that i want to display but not make the calculations for
this is where ive gotten to:
SELECT DISTINCT accid, account.custid, customer.title || ' ' || customer.firstname || ' ' || customer.lastname AS Name, product.isaname AS ProductName,product.intrate, balance, (account.accrued + ((product.intrate/365)*account.balance))AS accrued, active
FROM account
INNER JOIN customer ON customer.custid = account.custid INNER JOIN product ON product.prodid = account.prodid
WHERE active = 1