On 2/14/2012 10:30 AM, carsten@stripped wrote:
> On 14.02.2012 10:20, Alex Schaft wrote:
>> I need to update a table along the lines of the following
>> update table set LastUpdate=now(), UpdateSource='Abc' Where Key1 = 'Def'
>> and Key2 = 'ghi'
>> I need to possible do anywhere from 2 to 20 of these. Would it be better
>> to call an update statement for each of these,
> What exactly are "these"? Is 'Abc' constant for all rows, or does it
> change for each Key1&Key2 value?
> If so, then simply
> WHERE (Key1=... AND Key2=...) OR (Key1=... AND Key2=...) OR... should
> or even:
> WHERE (Key1, Key2) IN (val1, val2),(val3,val4), ...
> If 'Abc' changes per Key1&Key2 values, explore the CASE statement.
> / Carsten
'Abc' would stay the same, as well as 'Def', but 'ghi' will change. I'll
look into the where with the in operator, thanks.