472,993 Members | 3,192 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 software developers and data experts.

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 10758
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
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
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
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
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
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
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
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
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
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
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...
3
SueHopson
by: SueHopson | last post by:
Hi All, I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On...

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.