Re: EXECUTE IMMEDIATE - What's wrong ?
Posted in 1995
The EXECUTE IMMEDIATE statement was introduced in 4.10, to judge from the 4.1x Informix Guide to SQL Reference. However, 4.1x (and 6.0x) I4GL do not support any 5.0x or later syntax, and empirically do not support EXECUTE IMMEDIATE, the Informix Guide to SQL Reference notwithstanding. It isn't in the I4GL documentation. Don't try it in I4GL -- it won't work. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h> }From: rasto@softec.sk (Rastislav Janac) }Date: Thu, 6 Apr 1995 09:42:50 GMT }X-Informix-List-Id: <news.12803> } }Hi everybody, }I've RTFM and there I've found something like this : } }** MANUAL ** }QUICK EXECUTION } For simple statements thet do not require a cursor or host } variables, you can combine the actions of the PREPARE, the } EXECUTE, and the FREE statements into a single operation. } The EXECUTE IMMEDIATE statement takes a character string } and in one operation prepares it, executes it, and frees } the storage. } -------------------------------------------------------- } $ EXECUTE IMMEDIATE "drop index my_temp_index"; } -------------------------------------------------------- }************ } }So I tried it and the result was this : } }** 4gl ** } execute immediate "delete from my_temp_table" } | The cursor "immediate" has not yet been declare in this } | program ... }********** } }Release : }Manual = version 4.10 }RDS = version 4.1 }4GL = version 4.1 } }So WHAT'S WRONG WITH IT ? } } Rastislav JANAC SOFTEC s. r. o. } e-mail: rasto@softec.sk Kutuzovova 23 } phone : 42-7-273805 ext.127 831 01 Bratislava } fax : 42-7-272537 Slovakia }