Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error : Expected GLOBAL TEMPORARY

Status
Not open for further replies.

Sridharan

Technical User
Dec 3, 2001
523
IN
hello,

how do i create stored procedures in Teradata... when i try to create i get a message saying

Expected GLOBAL TEMPORARY

what should i do ????

thanks

sridharan
 
Hi,

When we last left thread328-281471 , we had decided you had the wrong TUF release. I am glad to see we are beyond that.

Ok...you take your stored procedure....

Replace Procedure GetCount(Parent Integer)
Begin
Declare x Integer;

Select count() into :x from mytable;
print x;
End

and put it in a file mysp.spl then you execute.....

.compile file = mysp.spl


If you are getting this error from the .compile I wonder if you have a DROP TABLE statement in your SPL and the PARSER is detecting you are trying to drop a Global Temp Table instead of a REAL table.

In this case you must specify

Drop Global temporary table blort;

so it knows Blort is a temp table.
 
tdatgod,

thanks for your reply.... from bteq i'm getting a different error...

BTEQ -- Enter your DBC/SQL request or BTEQ command:
.compile file='proc1.spl'
.compile file='proc1.spl'
*** Error: No TDSP support in the current RDBMS

i'm not getting that Expected GLOBAL TEMPORARY TABLE error..... how do i resolve this....

i tried to find the teradata version using the below sql

select
*
from
dbc.dbcinfo

and got

RELEASE V2R.03.00.01.00
VERSION

is that right?????????

how do i find the version no from the server.... from supvr in Database window i typed

get version

but it is not displaying the version


thanks

sridharan
 
Hi,
No. That's right. It appears you are running v2r3. Maybe your site downgraded recently?

STored procedures are only supported in v2r4.+

At this point I think your only recourse is to Order a FREE Copy of the Teradata for Windows Demo.


it is Teradata v2r4.1 and TUF 6.1.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top