Solved

wisql - shift to different databases in a procedure

Posted on 2002-05-02
4
227 Views
Last Modified: 2008-02-01
Is there any alternate way to shift between different databases in a procedure. I know we can't use, use database in procedure. I want to pass data base name as parameter because my procedure in one database and I want to perform table information from other data base. These are systems tables which have same name through the databases.

thanks,

hmk.
0
Comment
Question by:hmk
  • 2
  • 2
4 Comments
 
LVL 5

Expert Comment

by:amitpagarwal
ID: 6986902
what version of sybase are you using .. if you are using 12 and above, u may use the concept of dynamic sql
0
 

Author Comment

by:hmk
ID: 6986964
11.9.2
0
 
LVL 5

Accepted Solution

by:
amitpagarwal earned 50 total points
ID: 6986969
in 11.9.2, dynamic sql is not possible

what you may do is to insert the stored proc in sybsystemprocs database and then execute it from any db u like on that same server.
0
 

Author Comment

by:hmk
ID: 6987023
11.9.2
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article we will learn how to backup a VMware farm using Nakivo Backup & Replication. In this tutorial we will install the software on a Windows 2012 R2 Server.
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question