mber 07, 2002 7:15 PM
Subject: adding function, module to database
> Hi,
> suppose there is a database with lots of tables.
> I want to add a function to this database to return the following SQL
query:
>
> SELECT SUM(IF(HOUR(start)>'02:00:00' AND
> HOUR(stop)<
Hi,
suppose there is a database with lots of tables.
I want to add a function to this database to return the following SQL query:
SELECT SUM(IF(HOUR(start)>'02:00:00' AND
HOUR(stop)<='08:00:00',50*sessiontime,0)+IF(HOUR(start)>'08:00:00' AND
HOUR(stop)<='14:00:00',100*sessiontime,0)+IF(HOUR(sta