Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Distinct Count

edited December 2005 in General
Hi

We have a client file linked to an appointment file. A client can have
many appointments in a given period. I am trying to figure out how to
count the number of clients who have had an appointment in a given period
but only want to count them once, regardless of how many appointments
they have had. i.e. a distinct count.

Many thanks



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited December 2005
    Hi,

    How are you accessing this data? Are you using DADE and the Query Designer
    or are these just two tables you are accessing in your Delphi app? I
    believe you can use an expression such as the following to get a distinct
    count in SQL code...

    COUNT(DISTINCT ClientNo), granted you are grouping by ClientNo.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2005
    Hi Nico

    Thanks for your reply.

    Yes, we are using DADE, RB v7.03. Also using Advantage Database server
    for our app so will have go with that.

    Cheers,
    Tom


    Designer
    distinct
    $1@dm500....
    period



    --- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.