-
How to get a unique system-generated name for temporary table?
I remember there is a function to get a unique system-generated name for temporary table but don't know how.
Please let me know if someone knows.
Thanks.
Queyon
Queyon Zeng
-
Use a sequence as part of the name?
What is the requirements for this? Would a Global Temporary Table work better?
-
I want to create a global temporary table but don't want to get any table name confict.
Queyon Zeng
-
You could also use a timestamp:
PHP Code:
Create Table MyTempTable_<YYMMDDHH24MISS>...
"The person who says it cannot be done should not interrupt the person doing it." --Chinese Proverb
-
Originally Posted by Queyon
I want to create a global temporary table but don't want to get any table name confict.
Why in the world would you want to go through the overhead of creating a temporary table when you can just use a GTT?
Jeff Hunter
-
Originally Posted by Queyon
I want to create a global temporary table but don't want to get any table name confict.
Read this very interesting article - it answers your question:
http://www.indiana.edu/~dss/Services...s/tmptabl.html
-
Originally Posted by Queyon
I want to create a global temporary table but don't want to get any table name confict.
Do you know how GTT operates in Oracle?
Tamil
-
Originally Posted by tamilselvan
Do you know how GTT operates in Oracle?
Tamil
have to agree with that. trying to shoehorn somebody else's database on oracle. sometimes square pegs just don't fit into round holes no matter how big the hammer.
Jeff Hunter
-
Originally Posted by LKBrwn_DBA
You could also use a timestamp:
PHP Code:
Create Table MyTempTable_<YYMMDDHH24MISS>...
Hopefully nobody will attempt to do that operation twice in a second...
-
Originally Posted by Queyon
I want to create a global temporary table but don't want to get any table name confict.
If you create a GTT you only do it once and and any name conflict you'd resolve then. GTT avoids the need to create a name dynamically.
"The power of instruction is seldom of much efficacy except in those happy dispositions where it is almost superfluous" - Gibbon, quoted by R.P.Feynman
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
|