problems on translate oracle sql to informix
Posted in 2000
Topics: Stored Procedures & SPL
1:Is there a table like oracle's dual in Informix, which i can used for execute functions, for example get the system date? 2:How can i know how many records were updated by the last Update Sql statement in the Stored Procedure? 3:Is it possible to update records in a FOREACH dataset without a transaction? Sent via Deja.com http://www.deja.com/ Before you buy.
cnwy@my-deja.com wrote: > > 1:Is there a table like oracle's dual in Informix, which i can used for > execute functions, for example get the system date? The usual Informix-ish paradigm is to: SELECT <whatever> FROM systables WHERE tabid = 1; -- This is the tabid of the systables catalog table and -- is always present, it should also always be in cache -- though the optimizer is normally smart enough to not -- try to read the page anyway. > 2:How can i know how many records were updated by the last Update Sql > statement in the Stored Procedure? SELECT DBINFO( 'sqlca.sqlerrd2' ) FROM systables WHERE tabid = 1 > 3:Is it possible to update records in a FOREACH dataset without a > transaction? It should be except in an ANSI mode database. In an Informix mode logged database each SQL statement is a singleton transaction unless a BEGIN WORK has been issued. However, without an explicit transaction you will not be able to undo ANY of the updates the SPL performs. Art S. Kagel