Quick one - I'm a newbie. The following Group by logic is not working. What am I missing?.
Thanks for the help. I'm sure it is a semi-colon or something in the wrong place.
Code:
SELECT
Sec_Key,
Sec_SourceKey
FROM SecurityMaster_Source
UNION ALL Select
Sec_Key,
Sec_SourceKey
FROM SecurityMaster_Enhanced
GROUP BY [Sec_Key], [Sec_SourceKey];
Result....
The output is not grouping. There 2 matching rows in the underling 2 tables and they are both showing (duplicated and not grouped) in the output.
Thanks for the help. I'm sure it is a semi-colon or something in the wrong place.
Code:
SELECT
Sec_Key,
Sec_SourceKey
FROM SecurityMaster_Source
UNION ALL Select
Sec_Key,
Sec_SourceKey
FROM SecurityMaster_Enhanced
GROUP BY [Sec_Key], [Sec_SourceKey];
Result....
The output is not grouping. There 2 matching rows in the underling 2 tables and they are both showing (duplicated and not grouped) in the output.