Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Conditionally updating fields
Message
From
13/10/2016 05:35:25
 
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:
01641868
Views:
36
>>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.

Thanks Borislav! Didn't see that SQL-Server was the database! :-)
Fernando D. Bozzo
Madrid / Spain
Previous
Reply
Map
View

Click here to load this message in the networking platform