Subject | Re: {Disarmed} [firebird-support] Re: UNION prevents all records from being pulled to the results |
---|---|
Author | SoftTech |
Post date | 2012-10-30T13:16:24Z |
Thanks Alexandre, Aage, and Ann.
I've been working in Interbase and Firebird since 1996 and never had run across this before because my row were always distinct. I knew it was something I was doing wrong.
Thanks again to all who replied,
Mike
I've been working in Interbase and Firebird since 1996 and never had run across this before because my row were always distinct. I knew it was something I was doing wrong.
Thanks again to all who replied,
Mike
----- Original Message -----
From: Aage Johansen
To: firebird-support@yahoogroups.com
Sent: Monday, October 29, 2012 4:06 PM
Subject: {Disarmed} [firebird-support] Re: UNION prevents all records from being pulled to the results
SoftTech wrote:
<<
The SQL that follows pulls these results: (These results are missing 5
records from the second select of the union)
FEE_CODE AMT_EARNED_AGENCY SHOW_IN_PMT_DIST_PLAN FEE_CATEGORY
CCO2 76 1 0
SVC 1.17 1 0
SVC 30 1 0
... ...
>>
From Helen's Firebird book:
If duplicate rows are formed during the creating of the union set,
the default behavior is to exclude the duplicate rows from the set.
To include the duplicates, use UNION ALL instead of UNION on its own .
--
Aage J.
[Non-text portions of this message have been removed]
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
[Non-text portions of this message have been removed]