bonjour ,
J'ai un problème de syntaxe pour limiter le nombre de décimales dans un vue :
Erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 CREATE VIEW `mois_avg_5` AS select avg(`5_1_2014_thermo`.`pulse`) AS `AVG(pulse)` AS decimal (2,2) from `5_1_2014_thermo` union all select avg(`5_2_2014_thermo`.`pulse`) AS `AVG(pulse)` AS decimal (2,2) from `5_2_2014_thermo` union all select avg(`5_3_2014_thermo`.`pulse`) AS `AVG(pulse)` AS decimal (2,2) from `5_3_2014_thermo` union all select
Idem avec : ROUND(AVG(pulse),2)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS decimal (2,2) from `5_1_2014_thermo` union all select avg(`5_2_2014_thermo`.' at line 2
Partager