Hi,
If i understand  :

select month(entryDate) as monthPart, if (amount  is
nul,'',day(entryDate) ) as dayPart, amount 
from raindata
order by dayPart, monthPart


Best Regards
--------------------
Mathias FATENE
 
Hope that helps
*This not an official mysql support answer
 


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: mercredi 27 avril 2005 22:24
To: mysql@lists.mysql.com
Subject: query question



I have a table that the important parts look something like: keynum int,
entryDate datetime, amount varchar(10)

What I want to do is a query that gets me every day of the year and just
has null values for the days that don't have anything in the amount
column.  Is something like that possible with sql?  In fact, what I
would really like is:

select month(entryDate) as monthPart, day(entryDate) as dayPart, amount 
from raindata
order by dayPart, monthPart

just with the whole year filled in.  it will make my later code simplier
if I can not have to test for values as much.

--ja

-- 


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to