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

Distinct column

edited April 2006 in General
Is there a way to create a distinct calculated field, and then sort on it such that the dataset only shows the unique
values?

TIA,

John

Comments

  • edited April 2006
    Hi John,

    If you are using the DADE query designer, inside the Tables tab, you can
    select the distinct checkbox at the lower right corner to only select
    distinct values. Then you can define your calculated field in the calcs tab
    and lastly sort by that calculated field using the sort tab. The resulting
    SQL will look something like the following...

    SELECT DISTINCT orders.OrderNo,
    SUM(orders.AmountPaid) SUM_orders_AmountPaid
    FROM "orders.db" orders
    GROUP BY orders.OrderNo
    ORDER BY 2

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.