Re: Question about IF statements...

2004-01-14 Thread Cory Hicks
That did the trickthanks so much! Cory On Wed, 2004-01-14 at 12:50, Douglas Sims wrote: > Would something like this do what you want? > > SELECT project_id, SUM(time_worked) AS total FROM time_daily WHERE > user_id='clh' AND period_id='27' GROUP BY project_id HAVING total>0; > > > > Cor

Re: Question about IF statements...

2004-01-14 Thread Douglas Sims
Like this: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.0.13 Type 'help;' or '\h' for help. Type '\c' to clear the buffer. umysql> use test; Reading table information for completion of table and column names You can turn off this fea

Re: Question about IF statements...

2004-01-14 Thread Douglas Sims
Would something like this do what you want? SELECT project_id, SUM(time_worked) AS total FROM time_daily WHERE user_id='clh' AND period_id='27' GROUP BY project_id HAVING total>0; Cory Hicks wrote: Hello, I must be having a goober moment.I am running the following sql query with no probl

RE: Question about IF statements...

2004-01-14 Thread Mike Johnson
From: Cory Hicks [mailto:[EMAIL PROTECTED] > Hello, > > I must be having a goober moment.I am running the following sql > query with no problems: > > SELECT project_id, > IF (SUM( time_worked ) > '0.00', SUM( time_worked ),'NULL') AS total > FROM time_daily > WHERE user_id = 'clh' AND period