473,385 Members | 1,772 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.

Programming vs Query

Hi Group,

I have a problem and I don't know whether it is better solved via a
query or a bit of VBA programming. Given a table T with fields DATE and
AMOUNT and I want to create one other table O containing for each DATE
(except the smallest) from T the DATE and the difference from that
DATE's amount and the next smaller DATE's amount. And I want still
another table S which contains for each DATE the DATE and the sum of
all AMOUNTs for that DATE and all the smaller DATEs.

I can image how to do the first one with a query that contains TABLE
twice, but for the second one I don't have an idea.

Can you give my an hints or advice from experience?

thanks,
Robert

Jan 20 '07 #1
1 1303
Two comments on your request:

"Date" is a reserved word in Access/Jet. You'll need to reference it as
[date] or better yet, rename your field.

Storing calculated results is almost always not a good idea. Rather,
perform the calculation in your query/form/report whenever needed. There is
little/no performance penalty and your results will never be stale or out of
sync.

-Ed
<wi*********@gmail.comwrote in message
news:11**********************@q2g2000cwa.googlegro ups.com...
Hi Group,

I have a problem and I don't know whether it is better solved via a
query or a bit of VBA programming. Given a table T with fields DATE and
AMOUNT and I want to create one other table O containing for each DATE
(except the smallest) from T the DATE and the difference from that
DATE's amount and the next smaller DATE's amount. And I want still
another table S which contains for each DATE the DATE and the sum of
all AMOUNTs for that DATE and all the smaller DATEs.

I can image how to do the first one with a query that contains TABLE
twice, but for the second one I don't have an idea.

Can you give my an hints or advice from experience?

thanks,
Robert

Jan 21 '07 #2

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

Similar topics

4
by: Timo Virkkala | last post by:
I'm creating a system with Python CGIs, that connect to a database. I'm wondering about input validation. Of course I will check the length of the passed parameters, to (hopefully) prevent any DOS...
5
by: Michael Hobbs | last post by:
Yeah, yeah, another X-Oriented paradigm, but please hear me out. I have recently been studying up on EJB's in order to extend my resume. I have looked at J2EE several times over the past years,...
9
by: Steve Jorgensen | last post by:
First, an example - today, I wanted to print out the parameter values in a querydef object at a break point in the code for subsequent manual debugging of the query. In the past, I would have had...
2
by: Ed_P | last post by:
Hello I just wanted to get the opinions of those of you who have experience developing C# applications and programming in general. I currently am learning the basics of programming (choosing C#...
3
by: Alan | last post by:
I am coming from other programming tools field, and new to VB .NET. Just wondering what is the common approaching in database programming in VB .NET? 1) Are you guru always using the data aware...
17
by: Liam.M | last post by:
Hey guys, Forgive me if my question my be alittle silly, but I would very much appreciate and assistance that could be given! My situation is as follows: I have created a Button, and set...
5
by: CB | last post by:
I am an experienced but self-taught ASP programmer, and sometimes wonder about major issues of principle in programming. For example: I have a web application that iterates over a set of...
9
by: Bface | last post by:
Hello All, I've been doing some reading to see if I could do this function in my VB programming but it's definitely to advance for me. I have a form whose main source is a query. I am using a...
8
by: =?Utf-8?B?Sm9obg==?= | last post by:
Hi all, I am new to .net technologies. ASP.NET supports socket programming like send/receive in c or c++? I am developing web-site application in asp.net and code behind is Visual C#. In...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...
0
marktang
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
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...

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.