Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to do this?
Message
From
30/03/2005 23:31:43
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
How to do this?
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01000176
Message ID:
01000176
Views:
52
Hi,
I have records as below
Name         Date         Action
--------------------------------
John         01/01/2005    Y
John         01/03/2005    T
John         01/04/2005    F

I need to transform these records to :

Name         Date         Date2        Action
---------------------------------------------
John         01/01/2005   28/02/2005     Y
John         01/03/2005   31/03/2005     T
John         01/04/2005   / /            F
The date of next record will be the date2 of current record.

Any way to do this in SINGLE SQL statement (VFP/SQL Server)?
Currently I am using UDF() in SELECT list. Any other ways?

Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Next
Reply
Map
View

Click here to load this message in the networking platform