Search Postgresql Archives

How to return a resultset/table from a sql function?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Is it possible to return the following (parameterized) qyery from a sql or plpsql function, and if so, what is the syntax?

SELECT{ 	(SELECT COUNT(klantnummer) 		FROM abo_klt WHERE abonnement = $1),
		(SELECT SUM(aantal_abonnementen) 	FROM abo_klt WHERE abonnement = $1));




Groeten,

Joost

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux