Table structure?

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Apr 28 23:06:04 CDT 2006


On 4/28/06 8:10 PM, "Joakim Schramm" <joakim at astrocalc.com> wrote:

> Just to give as an example, my data looks something like this with | as
> field separator
> 
> 19971026030000|-1
> 19980329020000|-2
> 19981025030000|-1
> 19990328020000|-2
> 19991031030000|-1
> 20000326020000|-2
> 20001029030000|-1
> 
> Lets say if I make a lookup using the value 19990429073000 (29 April 1999
> 07:30:00) it will return me -2 as it's more then 19990328020000 but not as
> much as 19991031030000, but it's really not the comparison I am after here
> but the best way to structure the data.
> 
> The above is just a small shunk from one set of about 2000, which is further
> grouped into about 300 subsets. If I can use DateTime it would be great as
> it would cut the needed storage space with about 50% if I have understood it

:-) Aha! You have catch it. Right!

> right, or even more if the string is UTF-16. Question is just if I can
> effectively make a lookup with all the data in one table (I need to first
> pick the correct group of 300, then the correct subgroup holding the data
> above and determine were in the range the the given parrameter fits)?
> 
> Maybe this was all just too many words confusiong the whole thing, but... I
> am just asking Valentina up for the first dance ;-)

In fact you need just use SQL. In SQL you task looks simple:

SELECT * 
FROM T
WHERE fldGroup = SomeGtoupID AND
      fldDateTime BETWEEN date1 AND date2
    
DONE.

All rest job will do Valentina for you.
    

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list