0

I have three date columns which represented by strings.

Columns date1, and date2 are nullable columns. I want to order then in the following order - date1, date2, date3.

Is this a good workaround:

Select coalesce (NULLIF(date1,''), NULLIF(date2,''), date3)
4

1 回答 1

-2

如果您为丢失的日期存储 NULL 并且从不存储空白字符串,则 NullIF 是多余的,只需执行

Select coalesce (date1, date2, date3)
于 2013-11-07T20:25:27.253 回答