Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Findout Root Value
Message
From
17/04/2008 02:31:48
 
 
To
16/04/2008 23:36:49
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01311356
Message ID:
01311379
Views:
20
Hi,

try this for your first problem
SELECT MAX(code) FROM mytable WHERE code < [1101002]
and this for your second one
SELECT myfield FROM mytable WHERE myfield == LEFT([1101002],4)
now make those two select available in different functions maybe called 'searchnearestbelow' and 'checkparentnode'. Both Functions receive the base node as parameter and deliver the found node by return value.
Best Regards
-Tom

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.

Oh, and BTW: 010101100100011001010000011110000101001001101111011000110110101101110011
Previous
Reply
Map
View

Click here to load this message in the networking platform