----- Original Message -----
From: <rob@xxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Sent: Thursday, March 25, 2004 5:05 PM
Subject: Re: Null in SQL select union

> I'm a little confused also.  Suppose your table had the following data:
> ....+....1....+....2....+.

I want to get one line for each car color and type and an additional line
with the number of cars with the same type in my query output:

Type    Color    Number
Pickup    Red    -
Pickup    Blue    -
-            -            2
Van        Red    -
Van        Blue    -
Van        Green    -
-            -            3

When I use value 0 or '' as replacement in the second select-clause, the
total line are not positioned after the detail lines. Using NULL should do

Hope I could make clear what I mean? :-)


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.