Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Increment Field
Message
From
12/04/2008 08:46:26
 
 
To
11/04/2008 13:00:21
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01309981
Message ID:
01310166
Views:
23
>Is there a way to have a value that increments by one in a SQL statement?
>
>
>SELECT *, IncrementThisValueByOne FROM MyTable
>
>
>To get:
>
>
>MyFieldOne MyFieldTwo IncrementThisValueByOne
>
>Bobby      Jones      1
>Jamie      Lee        2
>Terry      Hatcher    3
>
SELECT *, RECNO() AS IncrementThisValueByOne;
FROM (SELECT * FROM MyTable WHERE ...) X
Previous
Reply
Map
View

Click here to load this message in the networking platform