Results 1 to 3 of 3

Thread: How to sort NULLs?

  1. #1
    Join Date
    Jan 2004
    Posts
    12

    How to sort NULLs?

    Hi All,

    I have a table with 3 columns. Product, Location and Value. The data looks like this:

    NULL NULL 100
    Atlanta NULL 50
    Atlanta Cookie1 30
    Atlanta Cookie2 20
    Dallas NULL 120
    Dallas Cookie1 80
    Dallas Cookie2 40

    This table gets filled with a Groupby with Rollup option. The NULLS show subtotals/total. Is there a way to build a query that returns the results with NULLs at the bottom of each section like:


    Atlanta Cookie1 30
    Atlanta Cookie2 20
    Atlanta NULL 50
    Dallas Cookie1 80
    Dallas Cookie2 40
    Dallas NULL 120
    NULL NULL 100

    Thanks,

    Shab

  2. #2
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    use ISNULL function.

    sample data and query would be more helpful

  3. #3
    Join Date
    Jan 2004
    Posts
    12
    I know how to use INSULL, but how do you use it to get the query sorted in the way I need it?


    Thanks,

    Shab

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •