Hi Just wondering if I should be able to prepare a PL/SQL statement that both creates a temporary table and accesses that temp table in the one prepare execute and bind statements, or am I going to need to do more than one prepare. Due to access I am unable to create functions or procedures on the database but temp tables are ok. eg below I want to end up being able to bind to :test to fetch my results, but I want to be able to prepare and execute the below in one go. .. Thanks in advance for any help... This works in sqlplus in the one statement but DBD Oracle is spitting the dummy when it gets to OPEN :test FOR as it isn't expecting this... BEGIN CREATE GLOBAL TEMPORARY TABLE "ip_table" ( nelocn VARCHAR2(10), netype VARCHAR2(10), neindex VARCHAR2(10) )ON COMMIT PRESERVE ROWS; commit; DECLARE ip VARCHAR2(50):= :ipaddress; BEGIN INSERT INTO ip_table (nelocn, netype, neindex) select equp_locn_ttname ,equp_equt_abbreviation, equp_index from equipment where equp_ipaddress = ip; commit; OPEN :test FOR SELECT nelocn FROM ip_table; END; END;
Thanks Russel Kropp Data Specialist Brisbane Records Management T 07 3606 7552 (extn 67552) F 07 3606 7119 E [EMAIL PROTECTED] W aapt.com.au <http://www.aapt.com.au/> Level 3, 100 Wickham Street, Fortitude Valley QLD 4006, Brisbane ________________________________ "This communication, including any attachments, is confidential. If you are not the intended recipient, you should not read it - please contact me immediately, destroy it, and do not copy or use any part of this communication or disclose anything about it." This communication, including any attachments, is confidential. If you are not the intended recipient, you should not read it - please contact me immediately, destroy it, and do not copy or use any part of this communication or disclose anything about it.
<<AAPT2.jpg>>