Re: [sqlite] Regarding redirecting SQL results and errors to a single output file.

2016-06-27 Thread Hick Gunter
SQLite is already telling you that whatever statement contains line 13 of your 
input file test44.sql is attempting to evaluate a function named log_file_check 
which is unknown to SQLite. Additionally, the correct command for exiting a 
SQLite shell is ".exit" and not "exit" alone.

Interfacing with SQLite using the command line shell and attempting to parse 
the output stream is not a very efficient way to write applications. Especially 
if you are mixing input statements, output data and error messages all in one 
stream.

-Ursprüngliche Nachricht-
Von: sqlite-users-boun...@mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Kaja 
Varunkumar
Gesendet: Montag, 27. Juni 2016 12:33
An: SQLite mailing list <sqlite-users@mailinglists.sqlite.org>
Betreff: Re: [sqlite] Regarding redirecting SQL results and errors to a single 
output file.

hello keith,
sqlite -echo test.sqlite < test44.sql  > test44.out 2>&1 is the correct command 
for redirecting.
I want on which query i got this error. My queries are in test44.sql.


Thanks,
varun



Sent with MailTrack
<https://mailtrack.io/install?source=signature=en=varunkaja.1...@gmail.com=22>

On 27 June 2016 at 15:55, Keith Medcalf <kmedc...@dessus.com> wrote:

>
> 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||2.0|1|Software
> > 102|NAME2|ASSISTANT1|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|ASSISTANT100
> > 10|Jack|ASSISTANT100
> > 10|Jack|ASSISTANT100
> > 10|Jack|ASSISTANT100
> > 10|Jack|ASSISTANT100
> > 10|Jack|ASSISTANT100
> > 102|NAME2|ASSISTANT1
> > 102|NAME2|ASSISTANT1
> > 102|NAME2|ASSISTANT1
> > 102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
> > 102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
> > 102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
> > 103|NAME3|ASSISTANT2
> > 103|NAME3|ASSISTANT2
> > 103|NAME3|ASSISTANT2
> > 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|ASSISTANT1
> > 104|NAME4|ASSISTANT1
> > 104|NAME4|ASSISTANT1
> > 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|ASSISTANT2
> > 105|NAME5|ASSISTANT2
> > 105|NAME5|ASSISTANT2
> > 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|T

Re: [sqlite] Regarding redirecting SQL results and errors to a single output file.

2016-06-27 Thread Kaja Varunkumar
hello keith,
sqlite -echo test.sqlite < test44.sql  > test44.out 2>&1 is the correct
command for redirecting.
I want on which query i got this error. My queries are in test44.sql.


Thanks,
varun



Sent with MailTrack
<https://mailtrack.io/install?source=signature=en=varunkaja.1...@gmail.com=22>

On 27 June 2016 at 15:55, Keith Medcalf <kmedc...@dessus.com> wrote:

>
> 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||2.0|1|Software
> > 102|NAME2|ASSISTANT1|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|ASSISTANT100
> > 10|Jack|ASSISTANT100
> > 10|Jack|ASSISTANT100
> > 10|Jack|ASSISTANT100
> > 10|Jack|ASSISTANT100
> > 10|Jack|ASSISTANT100
> > 102|NAME2|ASSISTANT1
> > 102|NAME2|ASSISTANT1
> > 102|NAME2|ASSISTANT1
> > 102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
> > 102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
> > 102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
> > 103|NAME3|ASSISTANT2
> > 103|NAME3|ASSISTANT2
> > 103|NAME3|ASSISTANT2
> > 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|ASSISTANT1
> > 104|NAME4|ASSISTANT1
> > 104|NAME4|ASSISTANT1
> > 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|ASSISTANT2
> > 105|NAME5|ASSISTANT2
> > 105|NAME5|ASSISTANT2
> > 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|ASSISTANT1
> > 106|NAME6|ASSISTANT1
> > 106|NAME6|ASSISTANT1
> > 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|ASSISTANT1
> > 107|NAME7|ASSISTANT1
> > 107|NAME7|ASSISTANT1
> > 107|NAME7|TITLE7|1997-06-22 02:02:02||2.0|1
> > 107|NAME7|TITLE7|1997-06-22 02:02:02||2.0|1
> > 107|NAME7|TITLE7|1997-06-22 02:02:02||2.0|1
> > 108|NAME8|ASSISTANT3
> > 108|NAME8|ASSISTANT3
> > 108|NAME8|ASSISTANT3
> > 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|ASSISTANT3
> > 109|N

Re: [sqlite] Regarding redirecting SQL results and errors to a single output file.

2016-06-27 Thread Keith Medcalf

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||2.0|1|Software
> 102|NAME2|ASSISTANT1|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|ASSISTANT100
> 10|Jack|ASSISTANT100
> 10|Jack|ASSISTANT100
> 10|Jack|ASSISTANT100
> 10|Jack|ASSISTANT100
> 10|Jack|ASSISTANT100
> 102|NAME2|ASSISTANT1
> 102|NAME2|ASSISTANT1
> 102|NAME2|ASSISTANT1
> 102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
> 102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
> 102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
> 103|NAME3|ASSISTANT2
> 103|NAME3|ASSISTANT2
> 103|NAME3|ASSISTANT2
> 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|ASSISTANT1
> 104|NAME4|ASSISTANT1
> 104|NAME4|ASSISTANT1
> 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|ASSISTANT2
> 105|NAME5|ASSISTANT2
> 105|NAME5|ASSISTANT2
> 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|ASSISTANT1
> 106|NAME6|ASSISTANT1
> 106|NAME6|ASSISTANT1
> 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|ASSISTANT1
> 107|NAME7|ASSISTANT1
> 107|NAME7|ASSISTANT1
> 107|NAME7|TITLE7|1997-06-22 02:02:02||2.0|1
> 107|NAME7|TITLE7|1997-06-22 02:02:02||2.0|1
> 107|NAME7|TITLE7|1997-06-22 02:02:02||2.0|1
> 108|NAME8|ASSISTANT3
> 108|NAME8|ASSISTANT3
> 108|NAME8|ASSISTANT3
> 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|ASSISTANT3
> 109|NAME9|ASSISTANT3
> 109|NAME9|ASSISTANT3
> 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|ASSISTANT1
> 110|TEMP|ASSISTANT4
> 110|NAME1|ASSISTANT1
> 110|TEMP|ASSISTANT4
> 110|NAME1|ASSISTANT1
> 110|TEMP|ASSISTANT4
> 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


Re: [sqlite] Regarding redirecting SQL results and errors to a single output file.

2016-06-27 Thread Kaja Varunkumar
Hello guys,

I am able to redirect errors. Can I get queries, where I failed.

Thanks,
varun

On 27 June 2016 at 15:21, Kaja Varunkumar  wrote:

> Thanks alot
>
> On 27 June 2016 at 15:13, Simon Davies 
> wrote:
>
>> On 27 June 2016 at 10:28, Kaja Varunkumar 
>> wrote:
>> > 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.
>>
>> Not an sqlite issue:
>> Google  "windows redirect stdout and stderr"
>> -->
>> http://stackoverflow.com/questions/1420965/redirect-stdout-and-stderr-to-a-single-file
>> .
>> .
>> .
>> >
>> > Thanks,
>> > varun
>>
>> Regards,
>> Simon
>> ___
>> 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


Re: [sqlite] Regarding redirecting SQL results and errors to a single output file.

2016-06-27 Thread Kaja Varunkumar
Thanks alot

On 27 June 2016 at 15:13, Simon Davies  wrote:

> On 27 June 2016 at 10:28, Kaja Varunkumar 
> wrote:
> > 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.
>
> Not an sqlite issue:
> Google  "windows redirect stdout and stderr"
> -->
> http://stackoverflow.com/questions/1420965/redirect-stdout-and-stderr-to-a-single-file
> .
> .
> .
> >
> > Thanks,
> > varun
>
> Regards,
> Simon
> ___
> 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


Re: [sqlite] Regarding redirecting SQL results and errors to a single output file.

2016-06-27 Thread Hick Gunter
You need to redirect "standard error" to "standard output". In linux/bash this 
is achieved by adding "2>&1" to your command line.

-Ursprüngliche Nachricht-
Von: sqlite-users-boun...@mailinglists.sqlite.org 
[mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Kaja 
Varunkumar
Gesendet: Montag, 27. Juni 2016 11:28
An: sqlite-users@mailinglists.sqlite.org
Betreff: [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||2.0|1|Software
102|NAME2|ASSISTANT1|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|ASSISTANT100
10|Jack|ASSISTANT100
10|Jack|ASSISTANT100
10|Jack|ASSISTANT100
10|Jack|ASSISTANT100
10|Jack|ASSISTANT100
102|NAME2|ASSISTANT1
102|NAME2|ASSISTANT1
102|NAME2|ASSISTANT1
102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
103|NAME3|ASSISTANT2
103|NAME3|ASSISTANT2
103|NAME3|ASSISTANT2
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|ASSISTANT1
104|NAME4|ASSISTANT1
104|NAME4|ASSISTANT1
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|ASSISTANT2
105|NAME5|ASSISTANT2
105|NAME5|ASSISTANT2
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|ASSISTANT1
106|NAME6|ASSISTANT1
106|NAME6|ASSISTANT1
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|ASSISTANT1
107|NAME7|ASSISTANT1
107|NAME7|ASSISTANT1
107|NAME7|TITLE7|1997-06-22 02:02:02||2.0|1
107|NAME7|TITLE7|1997-06-22 02:02:02||2.0|1
107|NAME7|TITLE7|1997-06-22 02:02:02||2.0|1
108|NAME8|ASSISTANT3
108|NAME8|ASSISTANT3
108|NAME8|ASSISTANT3
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|ASSISTANT3
109|NAME9|ASSISTANT3
109|NAME9|ASSISTANT3
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|ASSISTANT1
110|TEMP|ASSISTANT4
110|NAME1|ASSISTANT1
110|TEMP|ASSISTANT4
110|NAME1|ASSISTANT1
110|TEMP|ASSISTANT4
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


___
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: h...@scigames.at

This communication (including any attachments) is intended for the use of the 
intended recipient(s) only and may contain information that is confidential, 
privileged or legally protected. Any unauthorized use or dissemination of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the sender by return e-mail message and 
delete all copies of the original communication. Thank you for your cooperation.



Re: [sqlite] Regarding redirecting SQL results and errors to a single output file.

2016-06-27 Thread Simon Davies
On 27 June 2016 at 10:28, Kaja Varunkumar  wrote:
> 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.

Not an sqlite issue:
Google  "windows redirect stdout and stderr"
-->  
http://stackoverflow.com/questions/1420965/redirect-stdout-and-stderr-to-a-single-file
.
.
.
>
> Thanks,
> varun

Regards,
Simon
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] Regarding redirecting SQL results and errors to a single output file.

2016-06-27 Thread Kaja Varunkumar
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||2.0|1|Software
102|NAME2|ASSISTANT1|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|ASSISTANT100
10|Jack|ASSISTANT100
10|Jack|ASSISTANT100
10|Jack|ASSISTANT100
10|Jack|ASSISTANT100
10|Jack|ASSISTANT100
102|NAME2|ASSISTANT1
102|NAME2|ASSISTANT1
102|NAME2|ASSISTANT1
102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
102|NAME2|TITLE2|1958-02-02 02:02:02||2.0|1
103|NAME3|ASSISTANT2
103|NAME3|ASSISTANT2
103|NAME3|ASSISTANT2
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|ASSISTANT1
104|NAME4|ASSISTANT1
104|NAME4|ASSISTANT1
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|ASSISTANT2
105|NAME5|ASSISTANT2
105|NAME5|ASSISTANT2
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|ASSISTANT1
106|NAME6|ASSISTANT1
106|NAME6|ASSISTANT1
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|ASSISTANT1
107|NAME7|ASSISTANT1
107|NAME7|ASSISTANT1
107|NAME7|TITLE7|1997-06-22 02:02:02||2.0|1
107|NAME7|TITLE7|1997-06-22 02:02:02||2.0|1
107|NAME7|TITLE7|1997-06-22 02:02:02||2.0|1
108|NAME8|ASSISTANT3
108|NAME8|ASSISTANT3
108|NAME8|ASSISTANT3
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|ASSISTANT3
109|NAME9|ASSISTANT3
109|NAME9|ASSISTANT3
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|ASSISTANT1
110|TEMP|ASSISTANT4
110|NAME1|ASSISTANT1
110|TEMP|ASSISTANT4
110|NAME1|ASSISTANT1
110|TEMP|ASSISTANT4
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