Re: Number of Rows without Count Function
Posted in 1999
What about:
update statistics for table table_name;update table_name
set field1 = (select nrows from systables
where tabname = "table_name")
Francisco Queiros Pinto wrote:
> Hi,
>
> I'm trying to obtain the number of rows of a table without using
> the count function in Informix Universal Server 9.14.
>
> The problem is: I'm trying to update a field in a typed table
> (can't have serials) and I can't use it in subqueries to the table
> I'm updating...
>
> ---This is not possible----------------------
> update table
> set field1 = (select count(*) from table) + 1;
> --------------------------------------------
>
> There is other way to achieve this?
>
> The 'INFO Status' Command gives me the
> information I need, but there is no way to
> obtain it to process using SQL .
>
> There is an Hidden Column (like rowid) which
> gives me the the information I need?
>
> Has someone knows the data structure associated
> with a Table?
>
> Many thanks in advance for any help.
>
> --
> Francisco
--
Carlos Benjamin, Jr.
x 2364
mailto:inf999@cap-az.com