Re: Redirection résultat dans un fichier CSV
Rebonjour,
mysql> SELECT MAX(`Date`) AS `Date`, `Time`, Logginmsg, TokenName FROM authentlog GROUP BY TokenName ORDER BY Date DESC;
+------------+----------+-----------------------+---------------+
| Date | Time | Logginmsg | TokenName |
+------------+----------+-----------------------+---------------+
| 2016-08-19 | 09:22:24 | "New Authentication." | "Rala_YXE" |
| 2016-08-19 | 09:22:24 | "New Authentication." | "EBA_YELL" |
| 2016-08-19 | 09:22:24 | "New Authentication." | "Fred_Lopez" |
| 2016-08-18 | 09:22:24 | "New Authentication." | "Tony_Perez" |
| 2016-08-16 | 09:22:24 | "New Authentication." | "ASAN_DERU" |
| 2016-08-15 | 09:22:24 | "New Authentication." | "OUS_NIER" |
+------------+----------+-----------------------+---------------+
Et avec la clause WHERE:
mysql> SELECT MAX(`Date`) AS `Date`, `Time`, Logginmsg, TokenName FROM authentlog WHERE (TokenName like '%Fred_Lopez%') OR (TokenName like '%Tony_Perez%') GROUP BY TokenName ORDER BY Date DESC;
+------------+----------+-----------------------+---------------+
| Date | Time | Logginmsg | TokenName |
+------------+----------+-----------------------+---------------+
| 2016-08-19 | 09:22:24 | "New Authentication." | "Fred_Lopez" |
| 2016-08-18 | 09:22:24 | "New Authentication." | "Tony_Perez" |
+------------+----------+-----------------------+---------------+
2 rows in set (0.00 sec)
A priori cela répond à mon besoin (sur ma machine de test), à vérifier en prod.
Subject
Views
Written By
Posted
2889
August 19, 2016 03:58AM
1487
August 19, 2016 11:35AM
1296
August 23, 2016 05:56AM
1267
August 23, 2016 07:42AM
1143
August 23, 2016 07:44AM
Re: Redirection résultat dans un fichier CSV
1200
August 23, 2016 09:02AM
1102
August 23, 2016 09:05AM
1229
August 23, 2016 09:51AM
1112
August 23, 2016 09:56AM
1146
August 23, 2016 10:03AM
1097
August 23, 2016 10:09AM
1215
August 24, 2016 01:14AM
1105
August 24, 2016 01:22AM
1153
August 24, 2016 02:25AM
1131
August 24, 2016 02:35AM
1117
August 24, 2016 02:47AM
1170
August 24, 2016 03:25AM
1176
August 24, 2016 03:36AM
1279
August 24, 2016 03:44AM
1242
August 26, 2016 04:20AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.