Avatar of arun401
arun401
 asked on

How to Load a Store procedure in Sybase database.?

How to Load a Store procedure in Sybase database.?
I have a new SP called as fetch_cust_location,Please tell me how to load that SP in SYBASE Database,in Sybase Server,

Thanks Arun P
Sybase DatabaseDatabases

Avatar of undefined
Last Comment
alpmoon

8/22/2022 - Mon
Raja Jegan R

>> I have a new SP called as fetch_cust_location

If you have CREATE / ALTER scripts of your procedure, then execute it across your database after you execute USE db_name statement like

USE db_name

create procedure script

or

alter procedure script.

To run these things you need to use any of the client tools or Sybase client itself.
jlsilva01

ALTER PROCEDURE is not supported to Sybase ASE, just DROP PROCEDURE and CREATE PROCEDURE.

To load a SP into Sybase ASE, you can follow this steps:

use database_name
go

if exists (select * from sysobjects where name = 'PROC_NAME' and type = 'P')
   drop procedure PROC_NAME
go

create procedure PROC_NAME...
go
alpmoon

rrjegan17's syntax is for Sybase ASA. I think you should specify the actual Sybase product as it could be another Sybase product too.

Also is the question about the syntax or the tool to execute create proc command?
Your help has saved me hundreds of hours of internet surfing.
fblack61
arun401

ASKER
almoon,

I need the syntax to load a new sp or modified SP into the various DATABASE ,I am using the ISQL.
Please suggest

Thanks Arun P


ASKER CERTIFIED SOLUTION
jlsilva01

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
alpmoon

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.