-
hi shiva,
If u want to create global temp table at runtime then while inserting also u have to use dynamic sql. e. g. if u r creating global temp table as
a := 'create global temporary table shiva(customer_cd varchar2(20) NULL,
contact_type VARCHAR2(20) NULL,
seq_no INTEGER NULL)';
execute IMMEDIATE a;
then while inserting u should write insert statement as
a:= 'INSERT INTO shiva(customer_cd,contact_type,seq_no) VALUES ('||'1,'||'cust,'||1||')';
execute IMMEDIATE a;
The better solution on this is u create global temp table at sql prompt and use it where ever u want just like normal fisical table. Yes, it is session specific. Only thing is it would exist in ur schema with no records.
Kancha
[Edited by Kancha on 03-15-2001 at 06:18 PM]
-
declare
a varchar2(200);
begin
a := 'create global temporary table jegan(a number,c number) on commit preserve rows';
execute immediate a;
end;
/
jegan
Cheers!
OraKid.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|