Page 1 of 1

postgresql maths functions

Posted: Thu Jan 24, 2008 5:57 pm
by rene
As a result of comments in the following post and or use of two input cells I'm going to try and create a postgresql database and use openoffice to view it.

I seems that database maths functions are limited to a few basic financial/statistical functions (average, sum, etc.)

Can I create a database and then add functions such as multiplication of data in column 1 and column 2? Can I apply other maths functions across different databases (e.g. table 1, row 5, column 2 * column 3 / table 2 row 7 column 4)?

Re: postgresql maths functions

Posted: Thu Jan 24, 2008 6:33 pm
by Villeroy
Switch to SQL view. In SQL view turn on "native mode" (Edit>Run SQL directly...).
Base will not parse the SQL command anymore. Your SELECT statement will be passed over to the postgreSQL driver.

Re: postgresql maths functions

Posted: Thu Jan 24, 2008 7:26 pm
by DrewJensen
Actually you do not need to use SQL for most functions supplied by the database engine.

A simple rule of thumb is that if it is a single word it will work in the GUI.

You simply type the function into the FIELDS column in the GUI designer, along with the parameters ( Column Names, Constants, etc ).

Re: postgresql maths functions

Posted: Mon Jan 28, 2008 12:24 pm
by rene
I was originally thinking that I would create a spreadsheet and then have cells of a formula such as:

sum=((database 1 table 1, row 2 colum 3)*(spreadsheet cell a1)/(database 2 table 2, row 3 column 4))-exp (spreadsheet cell b2))

Do I have to perform calculations in base?