Re: Redirection résultat dans un fichier CSV
Donc la sous-requête contiendra toutes les clauses WHERE concernant les 200 utilisateurs
mysql> SELECT
-> MAX(`Date`) AS `Date`, `Time`, Logginmsg, TokenName
-> FROM authentlog
-> WHERE TokenName IN(
-> SELECT DISTINCT(TokenName) AS TokenName
-> FROM authentlog
-> WHERE (TokenName like '%Tony_Perez%') OR (TokenName like '%Fred_Lopez%') OR (TokenName like '%EBA_YELL%') OR (TokenName like '%KAZ_KSA%')
-> )
-> GROUP BY TokenName ORDER BY Date DESC;
+------------+----------+-----------------------+---------------+
| Date | Time | Logginmsg | TokenName |
+------------+----------+-----------------------+---------------+
| 2016-08-29 | 09:22:24 | "New Authentication." | "Fred_Lopez" |
| 2016-08-28 | 10:10:24 | "New Authentication." | KAZ_KSA |
| 2016-08-25 | 09:22:24 | "New Authentication." | "Tony_Perez" |
| 2016-08-19 | 09:22:24 | "New Authentication." | "EBA_YELL" |
+------------+----------+-----------------------+---------------+
4 rows in set (0.00 sec)
C'est plus propre niveau code mais suit le même raisonnement c'est à dire renseigner en dur les 200 utilisateurs dans des clauses WHERE ??
Subject
Views
Written By
Posted
2883
August 19, 2016 03:58AM
1485
August 19, 2016 11:35AM
1292
August 23, 2016 05:56AM
1267
August 23, 2016 07:42AM
1143
August 23, 2016 07:44AM
1199
August 23, 2016 09:02AM
1102
August 23, 2016 09:05AM
1229
August 23, 2016 09:51AM
1109
August 23, 2016 09:56AM
1146
August 23, 2016 10:03AM
1096
August 23, 2016 10:09AM
1214
August 24, 2016 01:14AM
1103
August 24, 2016 01:22AM
Re: Redirection résultat dans un fichier CSV
1150
August 24, 2016 02:25AM
1130
August 24, 2016 02:35AM
1117
August 24, 2016 02:47AM
1168
August 24, 2016 03:25AM
1176
August 24, 2016 03:36AM
1277
August 24, 2016 03:44AM
1240
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.