New question:
i have tables like
table_20041124,
table_20041125,
etc...
i'm trying to make function (for example):
=
CREATE FUNCTION get_count(text, text)
RETURNS int2 AS '
DECLARE
cnt int4;
BEGIN
SELECT INTO cnt COUNT(*)
FROM table_$1
I think you would have to do it something like this, although whether the
SELECT INTO works in an EXECUTE context I am not sure (note, completely
untested code!)
CREATE FUNCTION get_count(text, text) RETURNS int2 AS '
DECLARE
cnt int4;
BEGIN
EXECUTE ''SELECT INTO cnt COUNT(*) FROM
Adam Witney wrote:
I think you would have to do it something like this, although whether the
SELECT INTO works in an EXECUTE context I am not sure (note, completely
untested code!)
CREATE FUNCTION get_count(text, text) RETURNS int2 AS '
DECLARE
cnt int4;
BEGIN
EXECUTE ''SELECT INTO cnt
Hi,
Am Donnerstag, den 25.11.2004, 19:42 +0300 schrieb ON.KG:
New question:
i have tables like
table_20041124,
table_20041125,
etc...
i'm trying to make function (for example):
=
CREATE FUNCTION get_count(text, text)
RETURNS int2 AS '
DECLARE
hi,
ON.KG wrote:
New question:
i have tables like
table_20041124,
table_20041125,
etc...
i'm trying to make function (for example):
=
CREATE FUNCTION get_count(text, text)
RETURNS int2 AS '
DECLARE
cnt int4;
BEGIN
SELECT INTO cnt COUNT(*)
FROM