Redirection résultat dans un fichier CSV
Bonjour,
La requête suivante retourne sont résultat dans un fichier CSV:
select Date, Time, Logginemsg, TokenName from authentlog where TokenName like '%Fred_Lopez%' ORDER BY sngdate DESC LIMIT 1 into outfile 'logFL.csv';
select Date, Time, Logginemsg, TokenName from authentlog where TokenName like '%Tony_Perez%' ORDER BY sngdate DESC LIMIT 1 into outfile 'logTP.csv';
+------------+--------------+-----------------------+---------------------+
| Date | Time | Logginmsg | TokenName |
+------------+--------------+-----------------------+---------------------+
| 2016-08-18 | 09:22:24.288 | "New Authentication." | "Fred_Lopez" |
+------------+--------------+-----------------------+---------------------+
+------------+--------------+-----------------------+-------------------+
| Date | Time | Logginmsg | TokenName |
+------------+--------------+-----------------------+-------------------+
| 2016-08-19 | 00:50:31.384 | "New Authentication." | "Tony_Perez" |
+------------+--------------+-----------------------+-------------------+
J'ai 200 utilisateurs et j'ai besoin de:
1- Mettre ces informations dans un seul et unique fichier qui ne sera pas écraser après chaque exécution
2- Trouver un moyen d'automatiser ce script pour tous mes utilisateurs au lieu de renseigner cette ligne 200 fois.
Je vous remercie par avance de votre aide.
Subject
Views
Written By
Posted
Redirection résultat dans un fichier CSV
2885
August 19, 2016 03:58AM
1487
August 19, 2016 11:35AM
1294
August 23, 2016 05:56AM
1267
August 23, 2016 07:42AM
1143
August 23, 2016 07:44AM
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.