[cfaussie] Re: Oracle9i how to count statuses?

2007-05-08 Thread Zac Spitzer
In oracle two other functions which could be used are NVL and DECODE. at the same time CASE is more portable, but DECODE is very powerful z On 5/8/07, Scott Thornton [EMAIL PROTECTED] wrote: I have been using MS SQL 2000 for about 7 years now... but I had to look up NULLIF in books online

[cfaussie] Re: Oracle9i how to count statuses?

2007-05-07 Thread Scott Thornton
Hi, This is how I might do it in SQL Server: SELECT SUM(CASE WHEN deliverymethod = 'F' THEN 1 ELSE 0 END) AS FAXES, SUM(CASE WHEN deliverymethod = 'E' THEN 1 ELSE 0 END) AS EMAILS

[cfaussie] Re: Oracle9i how to count statuses?

2007-05-07 Thread Mike Kear
That did the trick, thanks Scott.I was trying to make it too complicated for myself. Case was the answer. -- Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion, PHP, ASP, ASP.NET hosting from AUD$15/month