Re: [GENERAL] Count(*) throws error

2007-07-11 Thread Tom Lane
"Jasbinder Singh Bali" <[EMAIL PROTECTED]> writes: > 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 a

Re: [GENERAL] Count(*) throws error

2007-07-11 Thread Rodrigo De León
On Jul 11, 4:00 pm, [EMAIL PROTECTED] ("Jasbinder Singh Bali") wrote: > I don't know why isn't count(*) working Works for me: create table tbl_concurrent(a int); insert into tbl_concurrent values (1); insert into tbl_concurrent values (9); insert into tbl_concurrent values (4); create or replace

Re: [GENERAL] Count(*) throws error

2007-07-11 Thread Adrian Klaver
-- Original message -- From: "Jasbinder Singh Bali" <[EMAIL PROTECTED]> > 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 > > Runni

Re: [GENERAL] Count(*) throws error

2007-07-11 Thread Erik Jones
On Jul 11, 2007, at 4:00 PM, Jasbinder Singh Bali wrote: 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 er