Re: Ignoring Error in SQL
Posted in 1999
Hey Bud,
You can run this from the command line:
However, error messages will be generated however the script will carry
on running.
dbaccess yourdbname < your.sql 2> stderr.log 1> stdout.log
You could even put this is a shell script and even redirect stderr to
/dev/null.
Neil.
In article <7gu5n8$i8f$1@news.xmission.com>,
Nayan Jain <nayan.jain@tatainfotech.com> wrote:
>
> Hi all,
>
> I have a .sql file which i run in dbaccess
>
> ##-------------Contents of .sql file------------##
>
> drop procedure abc;
> drop procedure def;
> drop procedure ghi;>
> ##------------- EOF ---------------------------##
>
> Now what happens is tht when i run this it drops the procedures in tht
> database. But if in case procedure 'def' is not at all there.It stops and
> gives an error. what i want is tht it should proceed ahead and delete next
> procedure 'ghi'
>
> It should not stop if it encounters error.
>
> TIA,
> Nayan !
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> "The question is not whether we will die, but how we will live."
> -Joan Borysenko
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own