Solved

wisql - shift to different databases in a procedure

Posted on 2002-05-02
4
228 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Some of the SEO trends we might expect in 2017.
ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

837 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