Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL update syntax
Message
From
21/11/2006 09:26:08
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL update syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01171410
Message ID:
01171410
Views:
50
Hi!

I have table kilometri with 3 fields:
ID, datum, stanjekm.

I want to update another table with stanjekm for max date which is less then some other date...
Here is code which work, but update for max stanjekm. This work, but when someone change km meter in his car, I get wrong result, of course....
How to get stanjekm for max datum, but less then ldDatod?
Update RptTjedniKm ;
	Set Startkm = (Select Max(kilometri.stanjekm) From kilometri ;
	where RptTjednikm.ID = kilometri.ID AND kilometri.datum < ldDatod )
Branko
Next
Reply
Map
View

Click here to load this message in the networking platform