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
2916
August 19, 2016 03:58AM
1502
August 19, 2016 11:35AM
1302
August 23, 2016 05:56AM
1277
August 23, 2016 07:42AM
1157
August 23, 2016 07:44AM
Re: Redirection résultat dans un fichier CSV
1213
August 23, 2016 09:02AM
1116
August 23, 2016 09:05AM
1239
August 23, 2016 09:51AM
1122
August 23, 2016 09:56AM
1160
August 23, 2016 10:03AM
1110
August 23, 2016 10:09AM
1226
August 24, 2016 01:14AM
1116
August 24, 2016 01:22AM
1163
August 24, 2016 02:25AM
1141
August 24, 2016 02:35AM
1128
August 24, 2016 02:47AM
1183
August 24, 2016 03:25AM
1186
August 24, 2016 03:36AM
1290
August 24, 2016 03:44AM
1254
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.