Hi, Casey Duncan wrote:
On Tue, 6 Jan 2004 13:55:07 -0500 (EST) Asad Habib <ahabib@engin.umich.edu> wrote:
Hello. Does anyone know if you can have multiple queries within a single Z SQL method? Thanks.
- Asad
Yes, so long as they do not return records. just put <dtml-var sql_delimiter> lines between them. i.e.:
UPDATE foo SET BAR=NULL
<dtml-var sql_delimiter>
UPDATE baz SET splat=NULL
This allows you to perform multiple inserts/updates/deletes in a single database transaction for instance.
; should be equivalent to sql_delimiter I think. May be it depends on the actual database. If database supports transactions, it should make no difference if all statements are in one ZSQL method or actually in different distinct and subsequently called ones :-) Regards Tino Wildenhain