Count(*) throws error

Поиск
Список
Период
Сортировка
От Jasbinder Singh Bali
Тема Count(*) throws error
Дата
Msg-id a47902760707111400q26555378s514ab9a5612ed3f4@mail.gmail.com
обсуждение исходный текст
Ответы Re: Count(*) throws error  (Erik Jones <erik@myemma.com>)
Re: Count(*) throws error  (Rodrigo De León <rdeleonp@gmail.com>)
Re: Count(*) throws error  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,

I'm using the following statement in my plpgsql function

SELECT INTO no_rows COUNT(*) FROM tbl_concurrent;   

I have decalred no_rows int4 and initialized it to zero

Running the function throws the following error:

ERROR:  syntax error at or near "(" at character 13
QUERY:  SELECT   $1 (*) FROM tbl_concurrent
CONTEXT:  SQL statement in PL/PgSQL function "sp_insert_tbl_concurrent" near line 8


If i comment this count(*) line, the error goes.

I don't know why isn't count(*) working

Thanks
Jas

В списке pgsql-general по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: how does a temp table work?
Следующее
От: "Anton Melser"
Дата:
Сообщение: Re: Postgres 8.2 binary for ubuntu 6.10?