RE: how to detect null value from QoQ result

2013-07-02 Thread Nathan Chen

I have found the problem and was able to fix it. It wasn't the if statement; it 
was because the query and the output was inside a loop and I was supposed to 
place the if statement outside of the output, logical error. Sorry guys to 
cause the grief, and thanks Raymond and AJ for your time.

Nathan

-Original Message-
From: AJ Mercer [mailto:ajmer...@gmail.com] 
Sent: Monday, July 01, 2013 10:35 PM
To: cf-talk
Subject: Re: how to detect null value from QoQ result


what do you see when you dump 'myAnotherQuery'?
is it NULL??



On 2 July 2013 12:03, Nathan Chen  wrote:

>
> I tried it but for some reason it just wouldn't work.
>
> Nathan
>
> -Original Message-
> From: AJ Mercer [mailto:ajmer...@gmail.com]
> Sent: Monday, July 01, 2013 9:45 PM
> To: cf-talk
> Subject: Re: how to detect null value from QoQ result
>
>
> try
>
>  Select id from myAnotherQuery 
> Where [some where clause] 
>
> myQuery.RecordCount EQ 0
>
>
>
> On 2 July 2013 11:38, Nathan Chen  wrote:
>
> >
> > All:
> >
> > I have a simple query of query as follow:
> >  Select count(*) as r_count 
> > from myAnotherQuery Where [some where clause] 
> >
> > I want the result to be dislayed as zero If it returns no records, 
> > So I use val() function #val(myQuery.r_count)#, 
> > but it doesn't work; it returns an empty string, not zero when no 
> > records are returned. Is there a quick way to detect the null and return 0?
> >
> > Nathan
> >
> >
> >
>
>
>
> 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356113
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: how to detect null value from QoQ result

2013-07-01 Thread AJ Mercer

what do you see when you dump 'myAnotherQuery'?
is it NULL??



On 2 July 2013 12:03, Nathan Chen  wrote:

>
> I tried it but for some reason it just wouldn't work.
>
> Nathan
>
> -Original Message-
> From: AJ Mercer [mailto:ajmer...@gmail.com]
> Sent: Monday, July 01, 2013 9:45 PM
> To: cf-talk
> Subject: Re: how to detect null value from QoQ result
>
>
> try
>
> 
> Select id from myAnotherQuery
> Where [some where clause]
> 
>
> myQuery.RecordCount EQ 0
>
>
>
> On 2 July 2013 11:38, Nathan Chen  wrote:
>
> >
> > All:
> >
> > I have a simple query of query as follow:
> >  Select count(*) as r_count
> > from myAnotherQuery Where [some where clause] 
> >
> > I want the result to be dislayed as zero If it returns no records, So
> > I use val() function #val(myQuery.r_count)#, but
> > it doesn't work; it returns an empty string, not zero when no records
> > are returned. Is there a quick way to detect the null and return 0?
> >
> > Nathan
> >
> >
> >
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356099
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: how to detect null value from QoQ result

2013-07-01 Thread Raymond Camden

I'm confused. When you cfdump the query result, what exactly are you
seeing? Are you seeing a zero-record query or a one row result with no
value? Either my answer or AJ's should have worked.


On Mon, Jul 1, 2013 at 11:05 PM, Nathan Chen  wrote:

>
> I did try that before but wouldn't work. Yes, it drives me crazy.
>
> Nathan
>
> -Original Message-
> From: Raymond Camden [mailto:raymondcam...@gmail.com]
> Sent: Monday, July 01, 2013 9:46 PM
> To: cf-talk
> Subject: Re: how to detect null value from QoQ result
>
>
> Maybe I'm crazy, but can't you just do
>
> 
> Nothing returned, dude!
> 
>
>
> On Mon, Jul 1, 2013 at 10:38 PM, Nathan Chen  wrote:
>
> >
> > All:
> >
> > I have a simple query of query as follow:
> >  Select count(*) as r_count
> > from myAnotherQuery Where [some where clause] 
> >
> > I want the result to be dislayed as zero If it returns no records, So
> > I use val() function #val(myQuery.r_count)#, but
> > it doesn't work; it returns an empty string, not zero when no records
> > are returned. Is there a quick way to detect the null and return 0?
> >
> > Nathan
> >
> >
> >
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356098
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: how to detect null value from QoQ result

2013-07-01 Thread Nathan Chen

I did try that before but wouldn't work. Yes, it drives me crazy.

Nathan

-Original Message-
From: Raymond Camden [mailto:raymondcam...@gmail.com] 
Sent: Monday, July 01, 2013 9:46 PM
To: cf-talk
Subject: Re: how to detect null value from QoQ result


Maybe I'm crazy, but can't you just do


Nothing returned, dude!



On Mon, Jul 1, 2013 at 10:38 PM, Nathan Chen  wrote:

>
> All:
>
> I have a simple query of query as follow:
>  Select count(*) as r_count 
> from myAnotherQuery Where [some where clause] 
>
> I want the result to be dislayed as zero If it returns no records, So 
> I use val() function #val(myQuery.r_count)#, but 
> it doesn't work; it returns an empty string, not zero when no records 
> are returned. Is there a quick way to detect the null and return 0?
>
> Nathan
>
>
> 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356097
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: how to detect null value from QoQ result

2013-07-01 Thread Nathan Chen

I tried it but for some reason it just wouldn't work.

Nathan

-Original Message-
From: AJ Mercer [mailto:ajmer...@gmail.com] 
Sent: Monday, July 01, 2013 9:45 PM
To: cf-talk
Subject: Re: how to detect null value from QoQ result


try


Select id from myAnotherQuery
Where [some where clause]


myQuery.RecordCount EQ 0



On 2 July 2013 11:38, Nathan Chen  wrote:

>
> All:
>
> I have a simple query of query as follow:
>  Select count(*) as r_count 
> from myAnotherQuery Where [some where clause] 
>
> I want the result to be dislayed as zero If it returns no records, So 
> I use val() function #val(myQuery.r_count)#, but 
> it doesn't work; it returns an empty string, not zero when no records 
> are returned. Is there a quick way to detect the null and return 0?
>
> Nathan
>
>
> 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356096
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: how to detect null value from QoQ result

2013-07-01 Thread Raymond Camden

Maybe I'm crazy, but can't you just do


Nothing returned, dude!



On Mon, Jul 1, 2013 at 10:38 PM, Nathan Chen  wrote:

>
> All:
>
> I have a simple query of query as follow:
> 
> Select count(*) as r_count from myAnotherQuery
> Where [some where clause]
> 
>
> I want the result to be dislayed as zero If it returns no records, So I
> use val() function #val(myQuery.r_count)#, but it
> doesn't work; it returns an empty string, not zero when no records are
> returned. Is there a quick way to detect the null and return 0?
>
> Nathan
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356095
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: how to detect null value from QoQ result

2013-07-01 Thread AJ Mercer

try


Select id from myAnotherQuery
Where [some where clause]


myQuery.RecordCount EQ 0



On 2 July 2013 11:38, Nathan Chen  wrote:

>
> All:
>
> I have a simple query of query as follow:
> 
> Select count(*) as r_count from myAnotherQuery
> Where [some where clause]
> 
>
> I want the result to be dislayed as zero If it returns no records, So I
> use val() function #val(myQuery.r_count)#, but it
> doesn't work; it returns an empty string, not zero when no records are
> returned. Is there a quick way to detect the null and return 0?
>
> Nathan
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356094
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


how to detect null value from QoQ result

2013-07-01 Thread Nathan Chen

All:

I have a simple query of query as follow:

Select count(*) as r_count from myAnotherQuery
Where [some where clause]


I want the result to be dislayed as zero If it returns no records, So I use 
val() function #val(myQuery.r_count)#, but it doesn't 
work; it returns an empty string, not zero when no records are returned. Is 
there a quick way to detect the null and return 0?

Nathan


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356093
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm