Re: Command Line execution of sql statement
Posted in 2003
Topics: Server Administration
The usual method is to run something like
dbaccess <dbname> <script>
where <dbname> is the name of your database
and <script> is the name of a script file with a filename extension of .sql
Not sure about isql but this probably works in a similar fashion
mozurkewichj@mps.
k12.mi.us (John To: informix-list@iiug.org
M) cc:
Sent by: Subject: Command Line execution of sql statement
owner-informix-li
st@iiug.org
06/06/2003 08:23
Please respond to
mozurkewichj
Hi all,
I am not sure how to do this, but what I want to do is have a cron
job execute a sql statement and dump the results in to a comma
delimited file. I know how to do everything but actually execute the
query. I have led to believe that this can be done with isql or
dbaccess. Any help would be appreciated.
--------------------------------------------------------------------------
THE FOLLOWING WARNINGS ATTACH TO THIS COMMUNICATION
This material is intended for the named recipient only and has been created
solely for the purpose and function of Livestock Improvement Corporation
Limited and may contain information that is subject to the Privacy Act /
Confidentiality / Privilege / Copyright. Any person other than the named
recipient is prohibited from retaining / disclosing / copying /
distributing / using all or part of this material.
# isql -qr "/path/to/your/script"
--ch
<gsturkenboom@lic.co.nz> wrote in message
news:bbogt7$qps$1@terabinaries.xmission.com...
>
>
> The usual method is to run something like
>
> dbaccess <dbname> <script>
>
> where <dbname> is the name of your database
> and <script> is the name of a script file with a filename extension of
.sql
>
> Not sure about isql but this probably works in a similar fashion
>
>
>
> mozurkewichj@mps.
> k12.mi.us (John To:
informix-list@iiug.org
> M) cc:
> Sent by: Subject: Command Line
execution of sql statement
> owner-informix-li
> st@iiug.org
>
>
> 06/06/2003 08:23
> Please respond to
> mozurkewichj
>
>
>
>
>
>
> Hi all,
> I am not sure how to do this, but what I want to do is have a cron
> job execute a sql statement and dump the results in to a comma
> delimited file. I know how to do everything but actually execute the
> query. I have led to believe that this can be done with isql or
> dbaccess. Any help would be appreciated.
>
>
>
>
> -------------------------------------------------------------------------
-
>
>
> THE FOLLOWING WARNINGS ATTACH TO THIS COMMUNICATION
> This material is intended for the named recipient only and has been
created
> solely for the purpose and function of Livestock Improvement Corporation
> Limited and may contain information that is subject to the Privacy Act /
> Confidentiality / Privilege / Copyright. Any person other than the named
> recipient is prohibited from retaining / disclosing / copying /
> distributing / using all or part of this material.
>
Ooops! Forgot to mention the database in there. Let's try one more time:
iqsl <database_name> -qr "/path/to/your/script"
Sorry 'bout that......
--ch
"Craig Haarmeyer" <craighaarmeyer@yahoo.com> wrote in message
news:YbTDa.3045$Pp2.1005@newssvr16.news.prodigy.com...
> # isql -qr "/path/to/your/script"
>
>
> --ch
> <gsturkenboom@lic.co.nz> wrote in message
> news:bbogt7$qps$1@terabinaries.xmission.com...
> >
> >
> > The usual method is to run something like
> >
> > dbaccess <dbname> <script>
> >
> > where <dbname> is the name of your database
> > and <script> is the name of a script file with a filename extension of
> .sql
> >
> > Not sure about isql but this probably works in a similar fashion
> >
> >
> >
> > mozurkewichj@mps.
> > k12.mi.us (John To:
> informix-list@iiug.org
> > M) cc:
> > Sent by: Subject: Command Line
> execution of sql statement
> > owner-informix-li
> > st@iiug.org
> >
> >
> > 06/06/2003 08:23
> > Please respond to
> > mozurkewichj
> >
>
> >
> >
> >
> >
> >
> > Hi all,
> > I am not sure how to do this, but what I want to do is have a cron
> > job execute a sql statement and dump the results in to a comma
> > delimited file. I know how to do everything but actually execute the
> > query. I have led to believe that this can be done with isql or
> > dbaccess. Any help would be appreciated.
> >
> >
> >
> >
>
-------------------------------------------------------------------------
> -
> >
> >
> > THE FOLLOWING WARNINGS ATTACH TO THIS COMMUNICATION
> > This material is intended for the named recipient only and has been
> created
> > solely for the purpose and function of Livestock Improvement Corporation
> > Limited and may contain information that is subject to the Privacy Act /
> > Confidentiality / Privilege / Copyright. Any person other than the
named
> > recipient is prohibited from retaining / disclosing / copying /
> > distributing / using all or part of this material.
> >
>
>