You can also use something else similar to mvp solution. Instead of using the ROW () function, which is not supported by Amazon Redshift ...
Invalid operation: the ROW expression, implicit or explicit, is not supported in the target list;
My suggestion is to use the NVL2 and CAST functions to create columns of different types before CHAR, if that type is compatible with all Redshift data types according to the documentation . Below is an example of how to achieve zero proof MD5 in Redshift.
SELECT md5(NVL2(col1,col1::char,''), NVL2(col2,col2::char,''), NVL2(col3,col3::char,'')) FROM mytable
This may work without adding the second argument of the NVL2 function to char, but it will definitely fail if you try to get md5 from a date column with a null value. I hope this will be helpful to someone.
source share