﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Database  / Creating Stored Procedures in Batch / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Wed, 03 Dec 2008 16:49:01 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Creating Stored Procedures in Batch</title><link>http://www.teradata.com/teradataforum/Topic11625-9-1.aspx</link><description>Thanks,I am using Teradata SQL Assistant 7.1</description><pubDate>Wed, 28 May 2008 05:01:10 GMT</pubDate><dc:creator>meetsatishg@gmail.com</dc:creator></item><item><title>RE: Creating Stored Procedures in Batch</title><link>http://www.teradata.com/teradataforum/Topic11625-9-1.aspx</link><description>It should work, this way in SQL Assistant as well, e.g I just tried following on V12:create procedure sp1()begin...end;create procedure sp2()begin...end;create procedure sp3()begin...end;In case of BTEQ scripts, suppose you are working in a folder "C:\SPTest" and you have saved all definitions (starting from "Create" till "End;") of all SPs in seperate files (e.g. sp1.spl, sp2.spl, sp3.spl) in the same folder, following BTEQ script will compile all three in batch mode:.LOGON server ip/login,pass;.DATABASE database;.COMPILE FILE = sp1.spl;.COMPILE FILE = sp2.spl;.COMPILE FILE = sp3.spl;.LOGOFF;HTH.Regards,Adeel</description><pubDate>Wed, 28 May 2008 04:56:20 GMT</pubDate><dc:creator>Adeel.Chaudhry</dc:creator></item><item><title>RE: Creating Stored Procedures in Batch</title><link>http://www.teradata.com/teradataforum/Topic11625-9-1.aspx</link><description>Hi ,IF I am executing following three statements at a time then they get executed even if executed individually then they also get executed as like same I need to create 5 stored procedureCREATE TABLE ALFCT_STATICCHANNEL(	 STATICCHANNELID  Decimal(18,0) NOT NULL,	 STATICCHANNELTYPE  varchar(256) NULL)PRIMARY INDEX ( STATICCHANNELID );CREATE TABLE ALENT_ARTWORKCAMPAIGN(	 CAMPAIGNID  Decimal(18,0) NOT NULL,	 CAMPAIGNNAME  varchar(255) NULL,	 VALIDTO  Timestamp NULL,	 CAMPAIGNTYPE  varchar(100) NULL)PRIMARY INDEX ( CAMPAIGNID );CREATE TABLE ALFCT_STOCK(	 STOCKID  Decimal(18,0) NOT NULL,	 STOCKLEVEL  Decimal(18,0) NULL,	 MINORDERLEVEL  Decimal(18,0) NULL)PRIMARY INDEX ( STOCKID );For my information will you please tell me how to create/Execute the batch in BTEQ.</description><pubDate>Wed, 28 May 2008 04:45:41 GMT</pubDate><dc:creator>meetsatishg@gmail.com</dc:creator></item><item><title>RE: Creating Stored Procedures in Batch</title><link>http://www.teradata.com/teradataforum/Topic11625-9-1.aspx</link><description>For my information, how can you write a batch in SQL Assistant?And can't you write a BTEQ script for a batch task?Regards,Adeel</description><pubDate>Wed, 28 May 2008 04:37:56 GMT</pubDate><dc:creator>Adeel.Chaudhry</dc:creator></item><item><title>RE: Creating Stored Procedures in Batch</title><link>http://www.teradata.com/teradataforum/Topic11625-9-1.aspx</link><description>Thanks for Reply,I am using Teradata SQL Assistant for creation of the stored procedures.They get created if executing individually but i need to execute all in a batch.Thanks</description><pubDate>Wed, 28 May 2008 04:34:29 GMT</pubDate><dc:creator>meetsatishg@gmail.com</dc:creator></item><item><title>RE: Creating Stored Procedures in Batch</title><link>http://www.teradata.com/teradataforum/Topic11625-9-1.aspx</link><description>Hello,If you are using BTEQ script for batch, you can use ".COMPILE FILE sp1.sql" to compile the SP.Regards,Adeel</description><pubDate>Wed, 28 May 2008 04:28:08 GMT</pubDate><dc:creator>Adeel.Chaudhry</dc:creator></item><item><title>Creating Stored Procedures in Batch</title><link>http://www.teradata.com/teradataforum/Topic11625-9-1.aspx</link><description>Hi,I need to create multiple stored procedures in a single script, i meanI am having definitions of 5 stored procedures.Individually they get created but when same definitions are executed in batch then the following Error Occurs "Only an ET or null statement is legal after a DDL Statement. "If anyone knows the solution please let me know..Thanks</description><pubDate>Wed, 28 May 2008 04:25:48 GMT</pubDate><dc:creator>meetsatishg@gmail.com</dc:creator></item></channel></rss>