as a beginner with libreoffice base I have not been able to solve a simple problem:
First question:
In my queries I have this calculation on several fields and I would like to use some variable name for this sentence - but I have not been able to figure out how to do it. The calculation itself is working correctly but to use it as it is now is not very practical
Code: Select all
CASE WHEN ( ROUND( ( 10 - ABS( DATEDIFF( 'ss', "lahto_t", "tulo_t" ) - 9000 ) / 211.5 ), 0 ) ) < 0 THEN 0 ELSE ROUND( ( 10 - ABS( DATEDIFF( 'ss', "lahto_t", "tulo_t" ) - 9000 ) / 211.5 ), 0 ) END "aikapist"
Can I replace the constants "9000" and "211.52" on the sentence with some name and if how?
These two values must be changed depending on application environment.
looking forward to your reply
regards
harritapio