Re: [SQL] assign count() result to a declared variable in plpgsql

2002-06-24 Thread Tom Lane
Joseph Syjuco <[EMAIL PROTECTED]> writes: > i want to put my count() result in a plpgsql declared integer variable > declare f_count_var integer; > begin > select into f_count_var count(empno) from employee > end; > tried this one but it doesnt work Works for me: regression=# create functi

Re: [SQL] assign count() result to a declared variable in plpgsql

2002-06-24 Thread Jeff Eckermann
try: f_count_var := count(empno) from employee; --- Joseph Syjuco <[EMAIL PROTECTED]> wrote: > > i want to put my count() result in a plpgsql > declared integer variable > > > declare f_count_var integer; > begin > select into f_count_var count(empno) from employee > end; > > tried this

[SQL] assign count() result to a declared variable in plpgsql

2002-06-24 Thread Joseph Syjuco
i want to put my count() result in a plpgsql declared integer variable declare f_count_var integer; begin select into f_count_var count(empno) from employee end; tried this one but it doesnt work ---(end of broadcast)--- TIP 3: