Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select max()
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Select max()
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01352446
Message ID:
01352446
Views:
58
The code below has been working for more than one year in many users computers
Now some guys is complaining that in all records, code is being replace with zero, instead of code + 1

One use sent me his table all records was filled with zero

But testing in my software I added sequence: 1,2,3,4,5,6,7.... etc

It works fine here !!

*****************************************************

SELECT ESTOQUE

dimension lctemp[1]
select max(code) from estoque ;
into array lctemp
lcTemp[1] = nvl(lcTemp[1],0)+1
replace coded with lctemp

SELECT ESTOQUE

= TABLEUPDATE (.T.)

*********************************************************
Next
Reply
Map
View

Click here to load this message in the networking platform