Cancel this, I spotted the problem, forgot the format(......,2);

This query works as expected:

select format(sum(p.badcheck)+ (count(p.badcheck)*-15),2) as Badcheck
from payout p,payhistory ph 
where ph.paydate between '2001-09-20' and '2001-09-30' 
and (p.payid = ph.payid and p.badcheck != '0.00')

>>I've been trying to figure out where I might be going wrong with this SQL syntax:
>>
>>select format(sum(p.badcheck)+ (count(p.badcheck)*-15)) as Badcheck
>>from payout p,payhistory ph 
>>where ph.paydate between '2001-09-20' and '2001-09-30' 
>>and (p.payid = ph.payid and p.badcheck != '0.00')
>>
>>MySQL said: You have an error in your SQL syntax near ') as Badcheck from
>>payout p,payhistory ph where ph.paydate between '2001-09-2' at line 1
>>
>>If I remove the "format(........)" from the query, it works prefectly! I'm trying to 
>format the result.
>>
>>Any help, appreciated! ;)
>>
>>mysql database.

Mike(mickalo)Blezien
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225)686-2002
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to