Conversion des fichiers de UTF-16 à UTF-8
[auf_coda_additions.git] / db / vues / auf_v_ControleBoursierBanques.sql
1 USE [coda-prod]
2 GO
3
4 DROP VIEW [dbo].[auf_v_ControleBoursierBanques]
5 GO
6
7 SET ANSI_NULLS ON
8 GO
9 SET QUOTED_IDENTIFIER ON
10 GO
11 CREATE VIEW [dbo].[auf_v_ControleBoursierBanques]
12 AS
13 SELECT TOP 100 PERCENT E.code, B.nb_comptes
14 FROM dbo.oas_element E LEFT OUTER JOIN
15 (SELECT elmcode, COUNT(*) AS nb_comptes
16 FROM oas_elmbanklist
17 WHERE elmcode LIKE '%L'
18 GROUP BY elmcode) B ON E.code = B.elmcode
19 WHERE (E.elmlevel = 2) AND (E.deldate IS NULL) AND (E.endyear LIKE 0) AND (E.code LIKE '%L')
20 ORDER BY B.nb_comptes DESC
21
22
23 GO