Quote:
|
Originally Posted by jaisonlucas
Hi,
What I need is to create a batch file to delete certain records from a table and periodically run it. I want to know the content of the batch file.
I know how to do the same in MS SQLServer db using the osql but not aware of it in informix.
|
If I understood you.
You need to create sql file with DELETE statement, for example,
DELETE from my_table WHERE my_col='bla-bla-bla'
Maybe you will have more complexer statement.
And create batch file. This batch file should has Informix environment such as
set INFORMIXDIR=your_dir
set INFORMIXSERVER=your_server_name
set ONCONFIG=ONCONFIG.your_server
set PATH=c:\ISM\2.20\bin;C:\Informix\bin;%PATH%
set CLIENT_LOCALE=your_locale
set DB_LOCALE=your_locale
maybe more
and next string
dbaccess your_database your_sql_file
And you can add this batch file to Windows scheduler.