-----Original Message----- From: users-bounces+pwhite= XXXX@XXXXX.COM [mailto:users-bounces+pwhite= XXXX@XXXXX.COM ] On Behalf Of Ronald Jeninga Sent: Monday, 20 February 2006 6:51 PM To: XXXX@XXXXX.COM Subject: Re: [Users] How to Log errors while executing ingres sql command Hi, use awk, like e.g. : ronald@serval:~/eclipse_workspace/SDMS/src> sql sdmsdb2 < /tmp/x | awk ' E_US0845 Table 'table_does_not_exist' does not exist or is not owned by you. (Mon Feb 20 08:45:31 2006) The /tmp/x script looks like select * from table_does_not_exist; \p\g select count(*) from iitables; \p\g The main problem is not to catch the error messages, it is the transaction logic. So if your script tries to perform multi-statement transactions, you'll end up with an inconsistent database (if you are unlucky, and programmers better not count on their luck). HTH, Ronald On 20 Feb 2006 10:25:50 +0530 independIT Integrative Technologies GmbH Sitz der Gesellschaft: Schrobenhausen HRB Neuburg B 1.521 Geschtsfrer: Dieter Stubler, Dipl. Inform. (FH) Ronald Jeninga, Diplom Mathematiker _______________________________________________ Users mailing list XXXX@XXXXX.COM http://www.**--****.com/