Dears,
Help me how to create a ageing report for 30 days,60 days and 90 days, anyone can help me to have standard select query.
Opening Balance
30 days
60 days
90 days
thanks in advance,
moyoal
4 20094
Dears,
Help me how to create a ageing report for 30 days,60 days and 90 days, anyone can help me to have standard select query.
Opening Balance
30 days
60 days
90 days
thanks in advance,
moyoal
Could you provide more detail on what exactly you want in your report?
More information (columns required, sample data) ?
example Header Details
customer No: xyz
From Date : 01-01-2007
to Date : 01-12-2007
cust Open Bal : <sum(credit-debit) before From Date i.e 01-01-2007>
=============== =============== =============== ===========
Line Details
Description Date Debit Credit
Debit 20-01-2007 2000 0
Credit 21-01-2007 0 1000
----------------------------------------------------------------------------------------------------------------
Total (Debit - Credit)
----------------------------------------------------------------------------------------------------------------
here what i want, credit of customer in last 30 days how much and in 60 days how much and 90 days how much
30 days Credit 60 days credit 90 days credit
100 500 400
please help me to create a query to get 30, 60 and 90 days credit amount
awaiting
Could you provide more detail on what exactly you want in your report?
More information (columns required, sample data) ?
Try something like: -
-
SELECT SUM(amount) FROM table1 WHERE date_column BETWEEN SYSDATE - 30 AND SYSDATE
-
UNION ALL
-
SELECT SUM(amount) FROM table1 WHERE date_column BETWEEN SYSDATE - 60 AND SYSDATE
-
UNION ALL
-
SELECT SUM(amount) FROM table1 WHERE date_column BETWEEN SYSDATE - 90 AND SYSDATE
-
-
Please realize the amount of data you're talking about. -
SELECT hp.party_name,
-
SUM(apsa.amount_due_remaining),
-
SUM(apsa.amount_due_original),
-
CASE
-
WHEN sysdate - rcta.trx_date >= 90 THEN 90
-
WHEN sysdate - rcta.trx_date >= 60 THEN 60
-
WHEN sysdate - rcta.trx_date >= 30 THEN 30
-
ELSE 00
-
END GROUP
-
FROM ar.hz_cust_accounts hca
-
INNER JOIN ar.ra_customer_trx_all rcta ON hca.cust_account_id = rcta.bill_to_customer_id
-
INNER JOIN ar.ar_payment_schedules_all apsa ON rcta.customer_trx_id = apsa.customer_trx_id
-
INNER JOIN ar.hz_parties hp ON hca.party_id = hp.party_id
-
GROUP BY hp.party_name,
-
CASE
-
WHEN sysdate - rcta.trx_date >= 90 THEN 90
-
WHEN sysdate - rcta.trx_date >= 60 THEN 60
-
WHEN sysdate - rcta.trx_date >= 30 THEN 30
-
ELSE 00
-
END;
-
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: amith.srinivas |
last post by:
Hi all,
From a word macro in VBA, I am trying to create a report in
access DB. The report is based on a query with a parameter. I am using
Set rpt = Application.CreateReport
rpt.RecordSource = <<Query_Name>>
Once I create the report, I m trying to create labels to display the
Report title in the Report Header section.
|
by: Stoney59 |
last post by:
I have a rather simple database that I've designed a switchboard that
runs several macros for producing a report that is based on a select
query. I need to design an input control that assigns a value to a
criteria on which the query/report is based.
TIA for your help.
|
by: DeanL |
last post by:
Hi All,
How do you run a SELECT query from code? I know that DoCmd.RunSQL only
works with action or DDF queries but I need to run a query from VBA and
add variables into the query as defined by entries on a form.
Many thank, Dean...
|
by: Phil |
last post by:
Is it possible to swap rows and columns in select query output so that
each record's data is displayed in a column? I want to collect data
each day and display it in a query with each day's date along the top
row and the data items below it. This would give a better appreciation
of changes over time. I apologise if I'm missing something obvious.
Phil
|
by: djflow |
last post by:
Hi!
II was wondering if you can help me with SQL query..
Below 7 separated select query works fine(only when they are retrieved separately)
But I want to combined them together and so that i can make report from my database on the one sheet rather than querying each select statement ( I will use MS Query from the Excel)
=========================================================
1)
select convert(varchar, create_date_time, 112) as Date,...
| |
by: sara |
last post by:
I am helping a non-profit track their elder clients and care given to
the clients.
The organization would like a report that shows various info on ALL
clients, such as:
# in each town,
# and Percent Male, Female, Smoker,
# in age range
# that use wheelchair or walker.
|
by: IntelliOfficer |
last post by:
The data I am using was imported from Excel. The tables were then merged into one large table (3 million + records) and so cannot be re-exported into excel for modification.
I am trying to map the transactional data back to a list of account numbers I have. (By matching the fields branch to Neab (Branch), and customer number (Pwanx) to Customer Number (Nean).
This works fine but as soon as I add the suffix (field Pwasx), I get (Error 3049)....
|
by: Trevor2007 |
last post by:
I am trying to hard code the following select query into a select case statement
ie (case1 <statment>, case 2 <statment>) but I getteing Compiler error: expected line number or label, or statement or end of statement on my select line , with and without the pertentheses at the end of my where clause. here is what I have, the query functions proporly in the access query builder.
"SELECT .Date, .IDNumber, .Time," _
& "...
|
by: Proaccesspro |
last post by:
Hello All,
I have a report that is tied to a SELECT query.....Problem is, when I open the report, it also opens the results of the select query. Is there a way to supress the Query from displaying the reults???
DoCmd.openquery "qryETS Open orders", (WHAT GOES HERE?)
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| | |