Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Help sa Access SQL mga master!

jocno1212

The Saint
Advanced Member
Messages
884
Reaction score
5
Points
28
Mga master, patulong naman, paano ko ba ieexecute yung query para dito para makuha ko yung overdue

Example:
Si client 3 may overdue from the month of January and February, Php300.00 each month.


attachment.php


Paano ko ba gagawan ng query yun na magiging ganito itsura assuming na as of March yung summary na gusto ko i-generate?

attachment.php


Pahelp naman po, mabubuwang na ako kakaisip po eh, BTW, access po ang gamit ko sa paggawa ng query ha, ADVANCE THANK YOU SA TUTULONG!





View attachment 261602
View attachment 261601
 

Attachments

  • 1.jpg
    1.jpg
    61.8 KB · Views: 95
  • 2.jpg
    2.jpg
    23.8 KB · Views: 92
Can you please try this:

SELECT client_no,bill_date,due_date,bill_amount,OVERDUE,remarks FROM(
SELECT a.*,
CASE when client_no = '1' then ""
when client_no = '2' then ""
when client_no = '3' then a.O else "" end as 'OVERDUE' FROM
(SELECT client_no,bill_date,due_date,bill_amount,remarks,(SELECT SUM(bill_amount) FROM sample_table WHERE bill_date='2016-03-01' and remarks<>'Unpaid') O
FROM sample_table WHERE bill_date='2016-03-01' GROUP BY client_no )a )a

I created my own table.

Hope this will help you.

Please see below result screenshot.
 

Attachments

  • result.JPG
    result.JPG
    18.9 KB · Views: 6
Last edited:
TS,, i select mo nalang ang unpaid sa table mo as of march then i sum mo nalng kng makano ang bill amount.

SELECT *,SUM(Bill_Amoun)AS Balance Due FROM tbl_BILLS WHERE DueDate <= #03-31-2016# AND Remarks = 'UNPAID'
 
Back
Top Bottom