Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get the current value from a transactional table
Message
From
24/09/2001 12:10:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
How to get the current value from a transactional table
Miscellaneous
Thread ID:
00560054
Message ID:
00560054
Views:
51
I have a table with the following structure and content

Person DATE CODE VALUE
001 1/1/2000 C001 123.00
001 1/5/2000 C002 5.00
001 1/10/2000 C001 50.00
001 1/15/2000 C002 10.00
002 1/2/2000 C001 12.00
002 1/6/2000 C002 52.00
002 1/11/2000 C001 51.00
002 1/14/2000 C002 13.00

So this is a time sensitive transactional table. Depending
on when you are logged in, you see the last value for a
specific code that was posted prior to the date. For example
if I look for the value for person 001 code C001 as of 1/4/2000
I will see 123, if I look for the same code as of 1/12/2000 I
will see 50.

The question :

What do you think is the fastest way to retrieve correct data
for :

all persons all codes when a date is provided?
one person all codes when a date is provided?
all person one codes when a date is provided?
one person one codes when a date is provided?

The table is fairly big, at least a few milion records. The syntax
should work on both VFP and MS SQL 2000.

Thank you

Sorin
Next
Reply
Map
View

Click here to load this message in the networking platform