Re: Age Analysis - SQL Help



On Apr 18, 5:01 pm, Bob Quintal <rquin...@xxxxxxxxxxxxx> wrote:
prakashwadhw...@xxxxxxxxx wrote innews:f3f5cad9-cf25-4dcc-978a-163f561cab2c@xxxxxxxxxxxxxxxxxxxxxxxxxxx
:

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.
.



Relevant Pages

  • Re: Age Analysis - SQL Help
    ... foll SQL statement will executed be in a loop for each ... customer. ... either 0 for a numeric or "" (empty string) for all ...
    (comp.databases.ms-access)
  • Re: Creating a new table
    ... Create a loop to ... collect the Columns and add it to the SQL Statement. ... >> So, if we are to create the customer table specified as above, we may ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Creating a select query using sql in VBA
    ... So for example I may have a customer that is a restuarant and therefore is ... linked to the restaurant discount structures. ... discounting table to then allow a select query to update a form control... ... I have been trying to create a VBA procedure to run the SQL statement to ...
    (microsoft.public.access.modulesdaovba)
  • Re: Mailing Database question
    ... I left off a line in that SQL statement. ... FROM [Sales Team] INNER JOIN RIdeas ... GROUP BY [Territory Manager] ... Add your SalesTerritory and your Customer tables to the grid ...
    (microsoft.public.access.queries)
  • RE: loops
    ... I have the following piece of code which checks the customer and product ... I have now realised that I need to enter a qty for price breaks so the loop ... Loop While Not C Is Nothing And C.Address firstAddress ...
    (microsoft.public.excel.programming)