From: | Ashish Karalkar <ashish_karalkar(at)yahoo(dot)com> |
---|---|
To: | slony <pgsql-general(at)postgresql(dot)org> |
Subject: | Need help on SP |
Date: | 2007-01-16 13:08:29 |
Message-ID: | 25659.94430.qm@web31610.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hello All,
I want to store count(*) of a table in a variable ,
for that I have declared a variable and wrote a
statment but it is giving me error.
can anybody please help me..
CREATE OR REPLACE FUNCTION foreign_keys_tables(OUT
par_result charecter varying, IN par_tablename
character varying , IN par_clomnname,IN par_colvalue
integer) AS
$BODY$)
DECALRE
countno integer;
BEGIN
Select count(*) into countno from par_tablename where
par_columnname=par_colvalue;
if countno>0 then
par_result='yes'
else
par_result='No'
end if
END;
$BODY$
LANGUAGE 'plpgsql' VOLATILE;
it is giving me error in select statment,
Thanks in advance
With Regards
Ashish Karalkar
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2007-01-16 13:33:44 | Re: Need help on SP |
Previous Message | Max Ueda | 2007-01-16 12:14:26 | Coercion in PGSQL? |