473,385 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How best to attack this problem? Sorting and summing transactions by date

We currently have a solution to this coded in VBA in Excel, but the
255 column limitation, general slowness, and instability of Excel are
rapidly becoming problems. Access has been suggested as a good
user-friendly solution.

The situation is this: every day we get an Excel list (or comma
delimited, or XML, however we specify) of payments for different
products on different days, going out to 2035 or so.

For example, assume today is December 1, 2004. Product A has a
purchase of $50 on December 1, January 1, and February 1. Product B
has a purchase of $75 on December 1, March 1, and a special purchase
(say on credit instead of cash, noted in another column on the input
sheet) on June 1.

I need to output one sheet that has, across the top, all products and
down the side all dates to show the purchases--like this:

Prod A cash | Prod A credit | Prod B cash | Prod B credit
12/1 $50 $0 $0 $75
12/2 $0 $0 $0 $0
12/3 $0 $0 $0 $0
12/4 $0 $0 $0 $0
....


a sheet that shows every day out to the end that I have $0 cash
purchases except for Dec 1, which has $125, Jan 1, which has $50,
February 1, which has $50, and March 1 which has $75. Credit
purchases are $0 except for June 1, which has $75, like this:

Cash Credit
12/1 $125 $0
12/2 $0 $0
12/3 $0 $0

Is the best solution to use queries, VB, or something in between? We
aren't tied to Access either, but I'm only a temporary employee and
I'd like to leave them with something maintainable. I'm looking more
for methods to attack the problem and database design guidelines than
actual code.

Much appreciated,
-Justin
Nov 13 '05 #1
1 1214
What you're looking for is a crosstab query in Access. Read up in
Access Help about them, they're exactly what you're looking for.
There's also a wizard that will help you set it up. Play around with
that a little bit.

The nice thing about the crosstab query option is that once it's set up
you shouldn't have to mess with it any more.

Hope that helps,

Carlos

Justin wrote:
We currently have a solution to this coded in VBA in Excel, but the
255 column limitation, general slowness, and instability of Excel are
rapidly becoming problems. Access has been suggested as a good
user-friendly solution.

The situation is this: every day we get an Excel list (or comma
delimited, or XML, however we specify) of payments for different
products on different days, going out to 2035 or so.

For example, assume today is December 1, 2004. Product A has a
purchase of $50 on December 1, January 1, and February 1. Product B
has a purchase of $75 on December 1, March 1, and a special purchase
(say on credit instead of cash, noted in another column on the input
sheet) on June 1.

I need to output one sheet that has, across the top, all products and
down the side all dates to show the purchases--like this:

Prod A cash | Prod A credit | Prod B cash | Prod B credit
12/1 $50 $0 $0 $75
12/2 $0 $0 $0 $0
12/3 $0 $0 $0 $0
12/4 $0 $0 $0 $0
...


a sheet that shows every day out to the end that I have $0 cash
purchases except for Dec 1, which has $125, Jan 1, which has $50,
February 1, which has $50, and March 1 which has $75. Credit
purchases are $0 except for June 1, which has $75, like this:

Cash Credit
12/1 $125 $0
12/2 $0 $0
12/3 $0 $0

Is the best solution to use queries, VB, or something in between? We
aren't tied to Access either, but I'm only a temporary employee and
I'd like to leave them with something maintainable. I'm looking more
for methods to attack the problem and database design guidelines than
actual code.

Much appreciated,
-Justin

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: SQLDBA | last post by:
I am in the process of evaluating some SQL Performance Monitoring /DBA tool to purchase (For SQL Server 2000). I have the following list of software that I came across and have to finalize which...
4
by: p175 | last post by:
People, I'm trying to figure if SQL is able find sequences of transactions that occur over say a four day period. I have a table that contains a txn id and a date. Each transaction might...
6
by: Terri | last post by:
I have a table called Transactions with 3 fields: ID, Date, and Amount. Each ID can have multiple transactions in one particular year. An ID might not have had any transactions in recent years. ...
7
by: Hank | last post by:
I have a report-summing problem using Access 2000. When a section runs over the end of the page, sometimes a detail gets picked up twice. Example: Customer Header XYZ Company Detail Section...
5
by: ReGenesis0 | last post by:
This is... I guess more of a programming structure question than anything. How does one index the popularity of something? Overall usage? How does recent-term popularity come in? Is there an...
7
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the...
1
by: MobiusDick | last post by:
Hi Everyone, I'm having a slight problem summing (almost) an entire recordset: I have an application that when given a table of customers and their estimated annual electricity consumption will...
4
by: Ron | last post by:
Hi All, I've got a client/transaction type of database where tblClient is linked to tblTransactions via ClientID. The client table contains all clients from day one. The transaction table...
5
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.