Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to do
Message
From
23/04/2008 04:39:51
Lutz Scheffler (Online)
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
23/04/2008 03:39:17
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01312556
Message ID:
01312571
Views:
15
Fabio,

now it works like a spell.

Thanks again,

Agnes
>>Fabio,
>>
>>now I get ERROR 1814 Queries of this type are not supported. It looks like he don't like ordr by or TOP.
>>
>>Agnes
>
>
>CREATE CURSOR curSource (dDate D , nValue  I)
>INSERT INTO curSource VALUES (DATE(2008,1,1),5)
>INSERT INTO curSource VALUES (DATE(2008,1,10),3)
>
>* THIS IS THE SQL CORRECT SOLUTION, BUT VFP SQL is too limited
>SELECT;
> dDate;
>, nValue - NVL((SELECT TOP 1 nValue FROM curSource WHERE dDate>X.dDate ORDER BY dDate),0);
> FROM curSource X;
> ORDER BY 1
>
>* climbing on mirrors
> SELECT;
> X.dDate;
>, X.nValue - NVL(X1.nValue,0);
> FROM curSource X;
> LEFT JOIN curSource X1 ON X1.dDate>X.dDate;
> WHERE X1.dDate=(SELECT MIN(dDate) FROM curSource WHERE dDate>X.dDate) OR X1.dDate IS NULL;
> ORDER BY 1
>
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Reply
Map
View

Click here to load this message in the networking platform