Standard computer stuff, operating system independant: You forgot to redirect handle 2 (stderr) to handle 1 (stdout)
sqlite -echo test.sqlite < test44.sql 2>&1 > test44.out > -----Original Message----- > From: sqlite-users-boun...@mailinglists.sqlite.org [mailto:sqlite-users- > boun...@mailinglists.sqlite.org] On Behalf Of Kaja Varunkumar > Sent: Monday, 27 June, 2016 05:28 > To: sqlite-users@mailinglists.sqlite.org > Subject: [sqlite] Regarding redirecting SQL results and errors to a single > output file. > > Hello, > > sqlite -echo test.sqlite < test44.sql > test44.out. > When I am running above command in windows command prompt, succeed query > redirected to test44.out and errors are displayed on the command prompt. > Here I want all the succeed and failed queries in one file. > > *EXAMPLE :-* > C:\Users\vkaja\Desktop\testing_mysql>sqlite -echo test.sqlite < > test44.sql > > ./output/test44.out > Error: near line 13: no such function: log_file_check > Error: incomplete SQL: exit > > *In test.out :-* > --include mkemp.txt > --Join Select > --General > > SELECT E.*, D.DNAME FROM EMP E, DEPT D WHERE E.EMPNO = 102 AND E.DEPTNO = > D.DEPTNO; > 102|NAME2|TITLE2|1958-02-02 02:02:02||20000.0|1|Software > 102|NAME2|ASSISTANT||||1|Software > --Support table aliases > SELECT E.ENAME AS EMP_NAME, D.DNAME AS DEPT_NAME FROM EMP E, DEPT D WHERE > E.DEPTNO = D.DEPTNO; > NAME1|Software > NAME2|Software > NAME3|Sales > NAME4|Software > NAME5|Sales > NAME6|Software > NAME7|Software > NAME8|Marketing > NAME9|Marketing > NAME1|Software > NAME2|Software > NAME3|Sales > NAME4|Software > NAME5|Sales > NAME6|Software > NAME7|Software > NAME8|Marketing > NAME9|Marketing > > -- Select With Order By > SELECT EMP.EMPNO, EMP.ENAME, EMP.JOB, EMP.HIREDATE, EMP.SAL, EMP.COMM, > EMP.DEPTNO FROM DEPT DEPT, EMP EMP ORDER BY EMP.EMPNO, EMP.HIREDATE; > 10|Jack|ASSISTANT||||100 > 10|Jack|ASSISTANT||||100 > 10|Jack|ASSISTANT||||100 > 10|Jack|ASSISTANT||||100 > 10|Jack|ASSISTANT||||100 > 10|Jack|ASSISTANT||||100 > 102|NAME2|ASSISTANT||||1 > 102|NAME2|ASSISTANT||||1 > 102|NAME2|ASSISTANT||||1 > 102|NAME2|TITLE2|1958-02-02 02:02:02||20000.0|1 > 102|NAME2|TITLE2|1958-02-02 02:02:02||20000.0|1 > 102|NAME2|TITLE2|1958-02-02 02:02:02||20000.0|1 > 103|NAME3|ASSISTANT||||2 > 103|NAME3|ASSISTANT||||2 > 103|NAME3|ASSISTANT||||2 > 103|NAME3|TITLE3|1997-03-12 08:09:54||1000.5|2 > 103|NAME3|TITLE3|1997-03-12 08:09:54||1000.5|2 > 103|NAME3|TITLE3|1997-03-12 08:09:54||1000.5|2 > 104|NAME4|ASSISTANT||||1 > 104|NAME4|ASSISTANT||||1 > 104|NAME4|ASSISTANT||||1 > 104|NAME4|TITLE4|1997-04-02 00:00:00||2.22|1 > 104|NAME4|TITLE4|1997-04-02 00:00:00||2.22|1 > 104|NAME4|TITLE4|1997-04-02 00:00:00||2.22|1 > 105|NAME5|ASSISTANT||||2 > 105|NAME5|ASSISTANT||||2 > 105|NAME5|ASSISTANT||||2 > 105|NAME5|TITLE5|1997-06-12 08:09:54||1000.5|2 > 105|NAME5|TITLE5|1997-06-12 08:09:54||1000.5|2 > 105|NAME5|TITLE5|1997-06-12 08:09:54||1000.5|2 > 106|NAME6|ASSISTANT||||1 > 106|NAME6|ASSISTANT||||1 > 106|NAME6|ASSISTANT||||1 > 106|NAME6|TITLE6|1997-06-12 02:02:02||2.22|1 > 106|NAME6|TITLE6|1997-06-12 02:02:02||2.22|1 > 106|NAME6|TITLE6|1997-06-12 02:02:02||2.22|1 > 107|NAME7|ASSISTANT||||1 > 107|NAME7|ASSISTANT||||1 > 107|NAME7|ASSISTANT||||1 > 107|NAME7|TITLE7|1997-06-22 02:02:02||20000.0|1 > 107|NAME7|TITLE7|1997-06-22 02:02:02||20000.0|1 > 107|NAME7|TITLE7|1997-06-22 02:02:02||20000.0|1 > 108|NAME8|ASSISTANT||||3 > 108|NAME8|ASSISTANT||||3 > 108|NAME8|ASSISTANT||||3 > 108|NAME8|TITLE8|1997-07-12 08:09:54||2000.5|3 > 108|NAME8|TITLE8|1997-07-12 08:09:54||2000.5|3 > 108|NAME8|TITLE8|1997-07-12 08:09:54||2000.5|3 > 109|NAME9|ASSISTANT||||3 > 109|NAME9|ASSISTANT||||3 > 109|NAME9|ASSISTANT||||3 > 109|NAME9|TITLE9|2010-07-20 02:02:02||2.22|3 > 109|NAME9|TITLE9|2010-07-20 02:02:02||2.22|3 > 109|NAME9|TITLE9|2010-07-20 02:02:02||2.22|3 > 110|NAME1|ASSISTANT||||1 > 110|TEMP|ASSISTANT||||4 > 110|NAME1|ASSISTANT||||1 > 110|TEMP|ASSISTANT||||4 > 110|NAME1|ASSISTANT||||1 > 110|TEMP|ASSISTANT||||4 > 110|NAME1|TITLE1|1990-02-02 02:02:02||2000.9|1 > 110|NAME1|TITLE1|1990-02-02 02:02:02||2000.9|1 > 110|NAME1|TITLE1|1990-02-02 02:02:02||2000.9|1 > 110|TEMP|ASSISTANT|2010-07-20 02:02:02|||4 > 110|TEMP|ASSISTANT|2010-07-20 02:02:02|||4 > 110|TEMP|ASSISTANT|2010-07-20 02:02:02|||4 > > -- check the log file > > Thanks, > varun > _______________________________________________ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users