Re: [SQL] length of array

2003-08-28 Thread Joe Conway
Chris Faulkner wrote: I would like to do it like this in Oracle select field from table N where [conditions] and NVL(N.level[1],0) = 0 and NVL(N.level[2],0) = 0 and NVL(N.level[3],0) = 0 and NVL(N.level[4],0) = 0 So if a row only has two elements in the array, but the first two both had values "0"

Re: [SQL] length of array

2003-08-28 Thread Chris Faulkner
bject: Re: [SQL] length of array Chris Faulkner wrote: > Is there a function in postgres to return the length of an array field ? I > have seen array_dims(array) but this returns a character value. Ideally, I'd > like something numeric returned. > Afraid not in 7.3.x or earlier. In 7.3.

Re: [SQL] length of array

2003-08-28 Thread Joe Conway
Chris Faulkner wrote: Is there a function in postgres to return the length of an array field ? I have seen array_dims(array) but this returns a character value. Ideally, I'd like something numeric returned. Afraid not in 7.3.x or earlier. In 7.3.x (but not earlier) you *can* do this (for a one-dim

[SQL] length of array

2003-08-28 Thread Chris Faulkner
Hello Is there a function in postgres to return the length of an array field ? I have seen array_dims(array) but this returns a character value. Ideally, I'd like something numeric returned. Thanks Chris ---(end of broadcast)--- TIP 6: Have you