Link to home
Create AccountLog in
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
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

>> 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.
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
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?
Avatar of arun401
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
Avatar of jlsilva01
jlsilva01
Flag of Brazil image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account