Mauro Bertoli wrote:
Hi, I've a field that contain values-comma-separated
like
A) 1;2;3;;5 -- ;2;;4;5
but also
B) 12;34;18
how I can get the max value?
For A I tried:
SELECT max(array_upper(string_to_array(answer,';'),1))
FROM values;
and work fine, but for B case I don't find a solution
like
SE
On Mon, May 29, 2006 at 13:22:38 +0200,
Mauro Bertoli <[EMAIL PROTECTED]> wrote:
> Hi, I've a field that contain values-comma-separated
> like
> A) 1;2;3;;5 -- ;2;;4;5
> but also
> B) 12;34;18
> how I can get the max value?
> For A I tried:
> SELECT max(array_upper(string_to_array(answer,';'),1)
Hi, I've a field that contain values-comma-separated
like
A) 1;2;3;;5 -- ;2;;4;5
but also
B) 12;34;18
how I can get the max value?
For A I tried:
SELECT max(array_upper(string_to_array(answer,';'),1))
FROM values;
and work fine, but for B case I don't find a solution
like
SELECT max(string_to_arra