Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VB, C#, and VFP data handling examples
Message
De
27/04/2007 16:23:00
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
 
 
À
27/04/2007 16:10:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
01215120
Message ID:
01220606
Vues:
36
>I think I understand how COALESCE works... I read a bit about it once. However, if your parm is NULL, does the update on the field actually take place? I don't know if I am explaining my question correctly, but say for example I have a trigger set on the Col1 field. An update procedure is run with a null @ParmCol1 value, therefore setting it back to the original value. Is the value reset, and would the trigger pick it up? Or is SQL smart enough to know not to do an actual update?
>
>Hi, Mike,
>
>Admittedly, I'm not sure whether a physical update takes place, if the transaction log gets hit. If I had to guess, it does, but it's probably worth at least knowing for sure, so I'll check it out.
>
>Either way, good question.
>
>I don't worry about triggers, because I write update triggers to actually check the values in Inserted/Deleted. From time to time, I see people who use the UPDATED function in a trigger, which will return a true simply if the column was specific in an UPDATE statement. By actually evaluating the column value in Inserted/Deleted, I know that I'm only working with values that were explicitly changed.
>
>Kevin

Although, if it is actually updated, it would be updated to the same value no matter what, so it may not be an issue.
Very fitting: http://xkcd.com/386/
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform