Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UPDATE the same field twice in one statement
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01433681
Message ID:
01433711
Views:
40
Good luck with the conversion.

>Thank you for your concern :). I wish I could rest but I need to get my app from VFP to MS SQL server or I will be resting full time :).
>
>>It's a statement not expression. You should get some rest on weekends not work. :)
>>
>>
>>>I believe the expression below is what will work. Thank you.
>>>
>>>>
>>>>That's not what your original update statement does. Try
>>>>
>>>>UPDATE mytable SET myfld1 = IIF(myfld1 > nValue1, myfld1 - nValue1, 0) + nValue2 WHERE Pk = nPkValue
>>>>
>>>>
>>>>You'll have to replace IIF() with CASE in MS SQL Server
>>>>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform