From be94b95f192e5567aae237158ec9acfb1ce609d4 Mon Sep 17 00:00:00 2001 From: Michael RICOIS Date: Mon, 27 Mar 2017 16:29:51 +0200 Subject: [PATCH] Fix SQL by Yoann --- public/assets/sql/tabNaf.sql | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/public/assets/sql/tabNaf.sql b/public/assets/sql/tabNaf.sql index d2f49ec7..468e8afc 100644 --- a/public/assets/sql/tabNaf.sql +++ b/public/assets/sql/tabNaf.sql @@ -1,5 +1,3 @@ -SELECT codNaf5 AS codNaf, libNaf5 AS libNaf -FROM jo.tabNaf5 -UNION SELECT codNaf700 AS codNaf, libNaf700 AS libNaf -FROM jo.tabNaf4 -ORDER BY codNaf \ No newline at end of file +SELECT codNaf5 AS codNaf, libNaf5 AS libNaf FROM jo.tabNaf5 WHERE LENGTH(codNaf5)=5 +UNION +SELECT codNaf700 AS codNaf, libNaf700 AS libNaf FROM jo.tabNaf4 WHERE libNaf700!='' ORDER BY codNaf; \ No newline at end of file