Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 2 of 2 total |
"IS NULL" in HAVING clause? |
Mon, Nov 26 2007 11:00 AM | Permanent Link |
"Hedley Muscroft" | Hi again,
Please can someone just tell if I'm correct in thinking that you can't use "IS NULL" as a condition in a HAVING clause? I know you can use it on a single field in a WHERE clause, but here's the SQL I'm working with :- ==================== select pay.id, pay.datetime, pay.amount, sum(alloc.amount) as allocated from pay left join alloc on (alloc.pay_id=pay.id) group by pay.id, pay.datetime, pay.amount having (sum(alloc.amount) < pay.amount) or (sum(alloc.amount) is null) order by pay.datetime ==================== DBISAM throws up an error #11949 - Invalid expression "is null" found in SELECT SQL... If I change it to "= null" then it seems to work fine. Is this just a small syntactical oversight in DBISAM, or do "is null" and "= null" mean something different in a HAVING clause? Thanks. |
Mon, Nov 26 2007 5:26 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Hedley,
<< If I change it to "= null" then it seems to work fine. Is this just a small syntactical oversight in DBISAM, or do "is null" and "= null" mean something different in a HAVING clause? >> It's a known bug in DBISAM that will be fixed in the next build - just use = NULL instead as a workaround. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |