How to compute the min and max of two numbers?

2010-04-26 Thread Peng Yu
I don't see there is a function to compute min or max of two numbers in a row. Essentially I want to select all the rows where the minimum of column1 and column2 are bigger than the maximum of col3 and col4 (The following code won't work as I expected, if I am correct). select * from a_table

Re: How to compute the min and max of two numbers?

2010-04-26 Thread Jesper Wisborg Krogh
On Tue, 27 Apr 2010 09:08:29 Peng Yu wrote: I don't see there is a function to compute min or max of two numbers in a row. Essentially I want to select all the rows where the minimum of column1 and column2 are bigger than the maximum of col3 and col4 (The following code won't work as I

Re: How to compute the min and max of two numbers?

2010-04-26 Thread Peter Brawley
I want to select all the rows where the minimum of column1 and column2 are bigger than the maximum of col3 and col4 ... WHERE Least(col1,col2) Greatest(col3, col4) ... PB http://www.artfulsoftware.com - Peng Yu wrote: I don't see there is a function to compute min or max of two numbers