Search Postgresql Archives

PostgreSQL Macro Query

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

 



 

Hi there,

 

I have written some code to calculate basic summary stats and wish to then incorporate this code within a macro... I want to run the code many multiple times and define the variables (on which the summary statistics are calculated) outside of the basic code. 

 

For example, see some very basic code below... I would use a macro so that I don’t have to change ‘STUDY_GROUP’ in the code each time.

 

select "STUDY_GROUP" , count("STUDY_GROUP")

from "TABLE1" group by "STUDY_GROUP";

 

Many thanks in advance,

 

 

 


[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