Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
UPDATE the same field twice in one statement
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01433681
Message ID:
01433703
Vues:
32
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
>
>> I think maybe you changed the syntax because function MAX() in SQL Server takes only one parameter (is this the case?)?
>
>I don't understand what you're asking and the aggregate MAX() function accept only one parameter in VFP as well.
>

Maybe we are talking about different things. But I see in VFP help MAX() function that takes many parameters.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform