f



Global temporary table

Hi all!

I dont know how to declare and use a global temporary table in my java
stored procedure....

I used these statements:

sql="declare global temporary table
session.temp(recordinteger,eventtype character(20)) not logged";
Statement st=con.createStatement();
st.execute(sql);

For inserting I'm trying to do..

sql="insert into session.temp values(2003,'fatal error');
st.executeUpdate(sql);

But its flagging an error.With just the declare statement there is no
error.But i read somewhere that a temporary table space needs to be
created.I dont know how to create that....

sql="create user temporary tablespace usetemp
pagesize 4k managed by system using ('C:\usetemp')"

But its giving a lexical error at C:\usetemp. How should the location
be mentioned within a sql statement to be executed through a jdbc
connection?

thanks,
bharathi

0
v
5/5/2005 7:06:16 AM
comp.databases.ibm-db2 12448 articles. 3 followers. arunrocks (9) is leader. Post Follow

0 Replies
370 Views

Similar Articles

[PageSpeed] 38

Reply: