× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi All,

I hate to ask for help with this as I'm trying to discover as much as
possible myself, but I'm afraid I'm a bit stuck here.

I'm dabbling with Query/400 (just for entertainment, mind you) but, never
having used this program before, it's a bit hard to get into the right
'mind-set'.

I have these database files with a layout similar to this:

DATE SYMBOL VALUE
01/01/2015 AAA 50
01/01/2015 BBB 40
01/01/2015 CCC 20
01/02/2015 AAA 60
01/02/2015 BBB 35
01/02/2015 CCC 25
01/03/2015 AAA 40
01/03/2015 BBB 25
01/03/2015 CCC 23

etc...

I'm trying to produce a query where it calculates the delta between
similar symbols, per day.

So:

01/01/2015 AAA = 50
01/02/2015 AAA = 60 -> delta compared to previous day = 10
01/03/2015 AAA = 40 -> delta compared to previous day = 20

...and so on, for each symbol.

I think I need to build some query result fields roughly like 'delta =
abs(VALUE(current date) - VALUE(current date - 1))' (I hope this makes
sense), but I cannot figure out how to do this.
I've read a boat-load of PDF's, but none really shows me how to approach
this problem (or perhaps I just don't 'get it' :)

Can someone perhaps push me in the right direction? I know this probably
can be solved much easier and quicker with other tools, but out of
curiosity I'd still like to know how this is accomplished in Query/400 :)

Regards,

Rene.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.