Return largest value of two columns in the same row

  • Ho,

    I have two date fields in my table. I want to update a control table for each customer, using whichever date is later.

    Can I achive this ? Sort of like this:

    update tableb

    set controldate = select MAX( date1 OR date2 *whichever later*) from tablea

    where tableb.customer = tablea.customer

    so I want the max date over the two columns. Hope I am making sense!!

    Can anyone help please?

    Thanks

  • Please don't post the same question twice.

    karthik

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply