473,498 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating Global Temp Table in UDB DB2 v8

I was unable to run the statement "CREATE GLOBAL TEMPORARY TABLE" on
unix version of DB2, it gave the follwing error

db2 => create global temporary table temp ( OGI_SYS_NR char(8) )
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0104N An unexpected token "create global temporary table temp (
OGI_S" was
found following "BEGIN-OF-STATEMENT". Expected tokens may include:
"<values>". SQLSTATE=42601

Can we create "Create Global Temporary Table" n unix version of DB2. I
donot want to create "Declared Global Temporary Table".

Any pointers on this would be of great help
Thanks,
Ranga
Nov 12 '05 #1
10 10790
Try DECLARE ... see the SQL Reference Manual.

Larry Edelstein

Ranga wrote:
I was unable to run the statement "CREATE GLOBAL TEMPORARY TABLE" on
unix version of DB2, it gave the follwing error

db2 => create global temporary table temp ( OGI_SYS_NR char(8) )
DB21034E The command was processed as an SQL statement because it was
not a
valid Command Line Processor command. During SQL processing it
returned:
SQL0104N An unexpected token "create global temporary table temp (
OGI_S" was
found following "BEGIN-OF-STATEMENT". Expected tokens may include:
"<values>". SQLSTATE=42601

Can we create "Create Global Temporary Table" n unix version of DB2. I
donot want to create "Declared Global Temporary Table".

Any pointers on this would be of great help
Thanks,
Ranga


Nov 12 '05 #2
Ranga,

No can do. Why can't you use a declared global temp?

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #3
Reference links only...

http://www.craigsmullins.com/zjdp_004.htm

Declared temporary tables, new to V7, complement the capability to create
global temporary tables (introduced in DB2 V5).

Quick doc link to compare both
http://publib.boulder.ibm.com/cgi-bi...RCHINDEX=INDEX

PM
"Serge Rielau" <sr*****@ca.eye-be-em.com> a écrit dans le message de
news:c2**********@hanover.torolab.ibm.com...
Ranga,

No can do. Why can't you use a declared global temp?

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab

Nov 12 '05 #4
PM (pm3iinc-nospam) <PM(pm3iinc-nospam)@sympatico.ca> wrote:
Reference links only...

http://www.craigsmullins.com/zjdp_004.htm

Declared temporary tables, new to V7, complement the capability to create
global temporary tables (introduced in DB2 V5).

Quick doc link to compare both

http://publib.boulder.ibm.com/cgi-bi...RCHINDEX=INDEX

CREATE is not (yet) supported on DB2 for workstations and it seems that
working on such a platform. You would have to use DB2 for zOS to have this
feature available.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #5
I'm well aware of the differences :-) I'm asking for two reasons:
1. Is there a viable alternative for the OP
2. How big is the need to get support for this feature for the OP (and
others for that matter)

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #6

I only dumped related links for those interested in the thread.
I was replying to the thread and not necessarely to individuals.
My mistake, i should have replied to the main thread and not under Serge's
post.

Knut >>
I know it's a mainframe feature, the link i provided gives
Ranked Search Results for Book: dsnsqh13 "DB2 UDB for OS/390 and z/OS V7 SQL
Reference"
in the header. (maybe i should have included it in my post.)

serge >> I'm well aware of the differences :-)
Shame on me if i ever think you don't know something... or can't learn it in
5 mins. ;-)

PM
Nov 12 '05 #7
PM (pm3iinc-nospam) <PM(pm3iinc-nospam)@sympatico.ca> wrote:
Knut >>
I know it's a mainframe feature, the link i provided gives
Ranked Search Results for Book: dsnsqh13 "DB2 UDB for OS/390 and z/OS V7
SQL Reference"
in the header. (maybe i should have included it in my post.)


PM, and I know that you know. But I got the impression that the OP didn't
know so I wanted to clarify things. ;-)

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #8
Knut Stolze <st****@de.ibm.com> wrote in message news:<c2**********@fsuj29.rz.uni-jena.de>...
PM (pm3iinc-nospam) <PM(pm3iinc-nospam)@sympatico.ca> wrote:
Reference links only...

http://www.craigsmullins.com/zjdp_004.htm

Declared temporary tables, new to V7, complement the capability to create
global temporary tables (introduced in DB2 V5).

Quick doc link to compare both

http://publib.boulder.ibm.com/cgi-bi...RCHINDEX=INDEX

CREATE is not (yet) supported on DB2 for workstations and it seems that
working on such a platform. You would have to use DB2 for zOS to have this
feature available.


Hi,
We are developing on Unix UDB DB2 and deploying it on z/OS DB2. Could
you please let me know if create global temporary table feature is not
available in Unix UDB DB2. We have to use Create global temporary
table in our project and i know that it is supported in z/OS.
Thanks,
Ranga
Nov 12 '05 #9
Ranga <ra*******@infosys.com> wrote:
We are developing on Unix UDB DB2 and deploying it on z/OS DB2. Could
you please let me know if create global temporary table feature is not
available in Unix UDB DB2. We have to use Create global temporary
table in our project and i know that it is supported in z/OS.


That's what I tried to say: CREATE GLOBAL TEMPORARY TABLE is available on
DB2 for z/OS but it is not (yet) available for DB2 for Linux, Unix,
Windows.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #10
Ranga wrote:
We are developing on Unix UDB DB2 and deploying it on z/OS DB2. Could
you please let me know if create global temporary table feature is not
available in Unix UDB DB2. We have to use Create global temporary
table in our project and i know that it is supported in z/OS.
Thanks,
Ranga

Good answer I can work with that as a requirement :-)
Knut is correct. What customer do is to encapsulate teh DECLARED global
temp DDL inside of a stored procedure.
When you move to DB2 z/Series all you need to do is remove the CALL.
(or you can do the call and tolerate the syntax error from DB2 z)

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1723
by: Ex-Em-El | last post by:
I have a problem in creating a dynamic table in the same xml : 1.xml: <?xml version="1.0" standalone="yes"?> <?xml-stylesheet type="text/xsl" href="2.xsl"?> <aaa...
11
16271
by: randi_clausen | last post by:
Using SQL against a DB2 table the 'with' key word is used to dynamically create a temporary table with an SQL statement that is retained for the duration of that SQL statement. What is the...
6
3745
by: pb648174 | last post by:
I have a pivot table implementation, part of which is posted below. It returns no errors in query analyzer, but when profiler is run, it shows that "Error 208" is happening. I looked that up in BOL...
0
2578
by: gwaddell | last post by:
I have a stored procedure that is loading data into a global temp table. Here is all the code for that stored procedure. CREATE PROCEDURE AS SET NOCOUNT ON BEGIN
7
6635
by: John Baker | last post by:
Hi: I would like to know how to create a temp DB to store the data in a table while I do something else with the table. Specifically, how do I create the temp remove the temp I want to be...
16
10295
by: pukivruki | last post by:
hi, I wish to create a temporary table who's name is dynamic based on the argument. ALTER PROCEDURE . @PID1 VARCHAR(50), @PID2 VARCHAR(50), @TICKET VARCHAR(20)
1
4618
by: crazy_jutt | last post by:
hi, anyone knows if i can create index on global temp tables if yes, will i use session schema for indexes also ? if yes, can i create all kinds like unique, clustered, mdc etc indexes in...
5
8797
by: Rahul B | last post by:
Hi, I have very little knowledge about creating Procedures/functions in DB2. When i tried to create the test function like CREATE FUNCTION GET_TEST (P_TEST_ID INTEGER, P_SEL_OR_SORT...
3
2429
by: Lennart | last post by:
Any thoughts on the following scenario anyone? During a performance test I discovered that the application asked one specific query extremely often. It turned out that this particular query...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7379
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4910
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1419
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.