Re: Deleting all rows from standard (with loggin) table on IDS 9.40
Posted in 2006
On 28/09/06, Lukas Barton <lukas@cnawr.cz> wrote:
> Double Echo wrote:
> > I might be wrong but can't you just use ondblog to turn logging off, delete the rows, then turn it on again? It means not having to log all those deletes. But of course if you have to log all of the deletions then this isn't going to work for you. You can do this for loading data too. Very simple.
> >
> > http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.admin.doc/admin464.htm
> >
> > Hope this helps...
> >
> You may miss that I am using JDBC (Hibernate exactly).
> So the only valid solution is to delete data in for (while) loop (only
> if the Hibernate dialect is InformixDialect).
>
> I have to have similar if (if (...Informix...)) on update/delete
> statement with subselect over updated table in where.
> Eg.:
>
> Informix:
> update Dotaz as dotaz set statusId=:status,
> metaTypChyby=:metaTypChyby where dotaz.davka=:davka and exists(select
> vstp.id from IdfKlient as vstp where vstp.dotaz=dotaz and
> tabulkaVSablone=:tabulka)
>
> Oracle, Postgres etc:
> update Dotaz as dotaz set statusId=:status,
> metaTypChyby=:metaTypChyby where dotaz.davka=:davka and dotaz.id in
> (select vstp.dotaz.id from IdfKlient as vstp where
> vstp.dotaz.davka=:davka and tabulkaVSablone=:tabulka)
>
> The first stament does not pass on Interbase/Firebird :-(
>
> That's the price of writing multidatabase application.
>
>
> Lukas
> _______________________________________________
> Informix-list mailing list
> Informix-list@iiug.org
> http://www.iiug.org/mailman/listinfo/informix-list
>
Lukas
Why do you need two separate statements for update. As far as I can
see the second statement should work fine in Informix (although there
may be a typo after 'select' ;-) )
Keith