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!

Creating Stored Procedures

Status
Not open for further replies.

Sridharan

Technical User
Dec 3, 2001
523
IN
Hello All,

How do i go about creating stored procedures in Teradata.. coz when i try to do it in Queryman it gives an error saying Global Temporary Tables... also i found from V2R4 documentation that one can use Bteq to create stored procedure using COMPILE but when i type COMPILE it gives unrecognized command....

does it so that only version xx.xx.xx and above will support stored procedures...

any inputz will be highly appreciated...

Regards


Sridharan
 
Stored procedures are available beginning with V2R4, and they can be created with either Queryman or BTEQ (with the .COMPILE FILE = filename command)
 
Hi,
Don't forget the Period.

.COMPILE file = blort.spl

I use an extension of .spl (Stored Procedure Language ) but I believe that is irrelevent.

You put the contents of your stored procedure in a file and then you use the .COMPILE statement to send that file to the database server and have it compile it.

We came up with this special way because it allows us to send up to 6 Meg worth of SPL text to the database where as normal CLI/ODBC interface only allows us to send 64k worth of SQL text.

 
thatz right but when i type this bteq says

BTEQ -- Enter your DBC/SQL request or BTEQ command:
.compile file=abc.sql;
.compile file=abc.sql;
*** Error: Unrecognized command COMPILE

i dunno why and also queryman also doesn't support creation... wat i wud like to know is the version no of bteq or teradata itself that supports stored procedures...

also whether teradata demo supports stored procedures....

regards

sridharan
 
Hi,
Please do a

.show version

inside of BTEQ. You must be running at least a 06.00 version of Bteq.


BTEQ Version 06.01.00.00 for SOLARIS running Streams TCP/IP


You may be running v2r4 Teradata server, but maybe you have an old version of BTEQ.


 
this wat it shows


show version;
BTEQ Version 05.02.00.00 for Win 32 running Windows Sockets
BTQMain : H5_07
BTQUtil : H5_09
BTQResp : H5_11
BTQParse : H5_11
BTQNotfy : H5_02
CapAAUtl : H3_04
CapCLUtl : H5_10
CapIOUtl : H5_12
CapERUtl : H5_03
CapLogW : H3_03
CapNfy : H3_03
CapLoadM : H3_05
CLIV2 : 04.05.00.10
MTDP : 04.05.01.00
MOSIos : 04.05.00.04
MOSIDEP : 04.05.00.03
OSENCRYPT : N/A
OSERR : 04.05.00.00

also i'm running demo version of teradata... is that to do with stored procedure creation....

how do i get the latest version of bteq....

regards

sridharan
 
Hi,
I believe the simplest way would be to Order a new copy of the DEMO software.



It comes with Teradata Version 4.1 and Teradata Utility Foundation 6.1.

Also to do stored procedures you will need to have Visual C++ 6.0 installed on the same machine that is running the terdata server since we use that compiler to compile the stored procedure.



-----
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top