Re: [SQL] Find min and max values across two columns?

2006-05-15 Thread Tom Lane
Emi Lu <[EMAIL PROTECTED]> writes: > ERROR: function greatest(integer, integer) does not exist > HINT: No function matches the given name and argument types. You may > need to add explicit type casts. We added greatest/least in 8.1, but before that you can just use a CASE expression instead, al

Re: [SQL] Find min and max values across two columns?

2006-05-15 Thread Scott Marlowe
On Mon, 2006-05-15 at 16:40, Emi Lu wrote: > Hello, > > I tried "select greatest(max(a), max(b)) from public.test", but I got > the following errors: > > ERROR: function greatest(integer, integer) does not exist > HINT: No function matches the given name and argument types. You may > need to

Re: [SQL] Find min and max values across two columns?

2006-05-15 Thread Emi Lu
Hello, I tried "select greatest(max(a), max(b)) from public.test", but I got the following errors: ERROR: function greatest(integer, integer) does not exist HINT: No function matches the given name and argument types. You may need to add explicit type casts. May I know where I can read t