Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditionally updating fields
Message
 
To
13/10/2016 04:12:33
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01641827
Message ID:
01641866
Views:
39
>Hi Frank:
>
>Your SQL is erroneous, because ISNULL() only accepts 1 parameters and returns True/False, so in this case Thierry was right in using NVL(), but at the cost of always replacing the value (with the actual one or the new one, whatever)
>
>But if you are processing to much data and want the best performance, then Dragan's suggestion of building your UPDATE (with a series of IF..ENDIF for each field) is the best performing and does not add any noticeable cost of maintenance.


Used database is SQL Server so ISNULL() have the right syntax.
In TSQL ISNULL() function is equal to VFP NVL() function.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform