"Frank Millman" <[EMAIL PROTECTED]> writes:
> The following works in 7.2.1 -

> 1. select count(*) from SysUsersCompanies where UserRowId =3D 3 ;
> 2. select substring('NY',(select count(*) from SysUsersCompanies where User=
> RowId =3D 3)+1,1) ;

> The first select returns either 1 or 0
> The second one uses the result in a more complex expression, and returns ei=
> ther 'Y' or 'N'

> In 7.3.2, the first select behaves the same, but the second one returns NUL=
> L.

Try coercing the result of count(*) to integer (it's bigint to start
with).

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to