Re: Problem assigning value to empty string
- From: "Dejan Sarka" <dejan_please_reply_to_newsgroups.sarka@xxxxxxxxxx>
- Date: Mon, 10 Dec 2007 07:54:48 +0100
If your res_id equals NULL, then the COUNT function simply skips this row. With so little info you provided, I can only drive you to check the ISNULL function if it can be helpful for you.
--
Dejan Sarka
http://blogs.solidq.com/EN/dsarka/default.aspx
"Ryan" <Ryan@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:1DA2FA2C-A892-4E04-9D04-90926726B4D7@xxxxxxxxxxxxxxxx
How can I assign the value of zero '0' to the 'empty string' result of the
count() function? Currently I can only count the res.id's that exist, but I
want the count to equal 0, for the one's that don't exist.
Heres a segment of the code I have so far, and it's not working.
...
CASE count(r.res_id)
WHEN '' THEN 0
ELSE count(r.res_id)
END
...
Thank you in advance.
.
- Follow-Ups:
- Re: Problem assigning value to empty string
- From: Ryan
- Re: Problem assigning value to empty string
- Prev by Date: Re: Select N rows and min
- Next by Date: Re: Problem assigning value to empty string
- Previous by thread: Re: Select N rows and min
- Next by thread: Re: Problem assigning value to empty string
- Index(es):
Relevant Pages
|