dbTalk Databases Forums  

Age Analysis - SQL Help

comp.databases.ms-access comp.databases.ms-access


Discuss Age Analysis - SQL Help in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Bob Quintal
 
Posts: n/a

Default Re: Age Analysis - SQL Help - 04-18-2009 , 08:01 AM






prakashwadhwani (AT) gmail (DOT) com wrote in
news:f3f5cad9-cf25-4dcc-978a-163f561cab2c (AT) z9g2000yqi (DOT) googlegroups.com
:

Quote:
I'm trying to generate an Age Analysis Report where the foll
SQL statement will executed be in a loop for each customer.



I was always under the impression that the "ValueIfNull" i.e. 2nd
argument of the NZ function was optional and so far it has worked
for me. However, if you feel I should change it and compulsorily
include the 2nd argument, then I'll go ahead and do so. I'd really
appreciate an explanation as to why though.
The reason is that Access makes a "best guess" as to the value to be
returned, either 0 for a numeric or "" (empty string) for all other
types. Sometimes it guesses wrong.

Also, having the default value explicitly stated makes your intentions
clear to a future maintainer of the database.

--
Bob Quintal

PA is y I've altered my email address.


Reply With Quote
  #12  
Old   
prakashwadhwani@gmail.com
 
Posts: n/a

Default Re: Age Analysis - SQL Help - 04-19-2009 , 02:05 AM






On Apr 18, 5:01*pm, Bob Quintal <rquin... (AT) sPAmpatico (DOT) ca> wrote:
Quote:
prakashwadhw... (AT) gmail (DOT) com wrote innews:f3f5cad9-cf25-4dcc-978a-163f561cab2c (AT) z9g2000yqi (DOT) googlegroups.com
:

I'm trying to generate an Age Analysis Report where the foll
SQL statement will executed be in a loop for each customer.

I was always under the impression that the "ValueIfNull" i.e. 2nd
argument of the NZ function was optional and so far it has worked
for me. *However, if you feel I should change it and compulsorily
include the 2nd argument, then I'll go ahead and do so. I'd really
appreciate an explanation as to why though.

The reason is that Access makes a "best guess" as to the value to be
returned, either 0 for a numeric or "" (empty string) for all other
types. Sometimes it guesses wrong.

Also, having the default value explicitly stated makes your intentions
clear to a future maintainer of the database.

--
Bob Quintal

PA is y I've altered my email address.

Thanks Bob !!! This really puts it in perspective. As the age-old
adage goes ... Better safe than sorry !!

I've finally got the module ready but it's running a bit slowly.
Should I start another thread for it or post the code here and
continue with it ?

Best Rgds,
Prakash.


Reply With Quote
  #13  
Old   
Bob Quintal
 
Posts: n/a

Default Re: Age Analysis - SQL Help - 04-19-2009 , 08:58 AM



prakashwadhwani (AT) gmail (DOT) com wrote in
news:d29036ac-8e00-442b-b3fc-657f57b59cbe (AT) a7g2000yqk (DOT) googlegroups.com
:

Quote:
On Apr 18, 5:01*pm, Bob Quintal <rquin... (AT) sPAmpatico (DOT) ca> wrote:
prakashwadhw... (AT) gmail (DOT) com wrote
innews:f3f5cad9-cf25-4dcc-978a-163f561cab
2c (AT) z9g2000yqi (DOT) googlegroups.com
:

I'm trying to generate an Age Analysis Report where the
foll SQL statement will executed be in a loop for each
customer.

I was always under the impression that the "ValueIfNull" i.e.
2nd argument of the NZ function was optional and so far it has
worked for me. *However, if you feel I should change it and
compulsorily include the 2nd argument, then I'll go ahead and
do so. I'd really appreciate an explanation as to why though.

The reason is that Access makes a "best guess" as to the value to
be returned, either 0 for a numeric or "" (empty string) for all
other types. Sometimes it guesses wrong.

Also, having the default value explicitly stated makes your
intentions clear to a future maintainer of the database.

--
Bob Quintal

PA is y I've altered my email address.


Thanks Bob !!! This really puts it in perspective. As the age-old
adage goes ... Better safe than sorry !!

I've finally got the module ready but it's running a bit slowly.
Should I start another thread for it or post the code here and
continue with it ?

Best Rgds,
Prakash.

Create a new thread. Responders often skip over threads which have
multiple answers.


--
Bob Quintal

PA is y I've altered my email address.


Reply With Quote
  #14  
Old   
prakashwadhwani@gmail.com
 
Posts: n/a

Default Re: Age Analysis - SQL Help - 04-20-2009 , 08:07 AM



On Apr 19, 5:58*pm, Bob Quintal <rquin... (AT) sPAmpatico (DOT) ca> wrote:
Quote:
prakashwadhw... (AT) gmail (DOT) com wrote innews:d29036ac-8e00-442b-b3fc-657f57b59cbe (AT) a7g2000yqk (DOT) googlegroups.com
:



On Apr 18, 5:01*pm, Bob Quintal <rquin... (AT) sPAmpatico (DOT) ca> wrote:
prakashwadhw... (AT) gmail (DOT) com wrote
innews:f3f5cad9-cf25-4dcc-978a-163f561cab
2... (AT) z9g2000yqi (DOT) googlegroups.com
:

I'm trying to generate an Age Analysis Report where the
foll SQL statement will executed be in a loop for each
customer.

I was always under the impression that the "ValueIfNull" i.e.
2nd argument of the NZ function was optional and so far it has
worked for me. *However, if you feel I should change it and
compulsorily include the 2nd argument, then I'll go ahead and
do so. I'd really appreciate an explanation as to why though.

The reason is that Access makes a "best guess" as to the value to
be returned, either 0 for a numeric or "" (empty string) for all
other types. Sometimes it guesses wrong.

Also, having the default value explicitly stated makes your
intentions clear to a future maintainer of the database.

--
Bob Quintal

PA is y I've altered my email address.

Thanks Bob !!! *This really puts it in perspective. As the age-old
adage goes ... Better safe than sorry !!

I've finally got the module ready but it's running a bit slowly.
Should I start another thread for it or post the code here and
continue with it ?

Best Rgds,
Prakash.

Create a new thread. Responders often skip over threads which have
multiple answers.

--
Bob Quintal

PA is y I've altered my email address.

Thanks Bob - I'll create a new thread & proceed as advised by you.

Rgds,
Prakash.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.