Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
GROUP BY clause ignored in VIEWS with UNION Clause
Versions des environnements
Network:
Windows 2008 Server
Due to backward compatibility issues with a large Application, am running with SET ENGINEBEHAVIOR 70.
Am attempting to create a View with a UNION clause.
1. The first SQL Statement is a simple SELECT * FROM View2 where View2 is another View containing a GROUP BY Clause
2. A UNION Clause is used with a 2nd SQL Statement.
Am able to successfully create the View programmatically. However, when I run the View, all records from View2 display - as if the GROUP BY Clause does not execute even though browsing View2 displays correct info.
It appears that running a View with a UNION clause will not execute a GROUP BY in any component. The View executes and ignores the component GROUP BY clause.
Anyone seen this?
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement