Hi
If I have a update statement like
UPDATE MY_TABLE
SET FieldName1 = Now(), FieldName2 = :MyVariable
WHERE FieldName3 = 'Y'
How can I only update the FieldName2 field if the value of MyVariable is
NOT NULL ?
Thanks
Neil
Try:
update my_table
set fieldname1 = Now(), Fieldname2 = :myVariable
where Fieldname3 is not null
On 10/28/13 11:06 AM, Neil Tompkins wrote:
Hi
If I have a update statement like
UPDATE MY_TABLE
SET FieldName1 = Now(), FieldName2 = :MyVariable
WHERE FieldName3 = 'Y'
How can I only update
Hello Neil,
On 10/28/2013 2:06 PM, Neil Tompkins wrote:
Hi
If I have a update statement like
UPDATE MY_TABLE
SET FieldName1 = Now(), FieldName2 = :MyVariable
WHERE FieldName3 = 'Y'
How can I only update the FieldName2 field if the value of MyVariable is
NOT NULL ?
Thanks
Neil
This needs
2013/10/25 00:08 +, Rick James
There's an old saying, If it ain't broke, don't fix it.
Why _might_ 5.6.x or 5.7.x be better for you? Sure there might be some
features you might want, might be some performance improvements that you might
notice, etc. And there might be some regressions
Hi Shawn
Thanks for your reply. Maybe my example wasn't detailed enough. Basically
the snippet of the UPDATE statement I provided shows updating only 1 field.
However in my live working example, I have about 20 possible fields that
might need to be updated if the variable passed for each field