• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 233
  • Last Modified:

wisql - shift to different databases in a procedure

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
hmk
Asked:
hmk
  • 2
  • 2
1 Solution
 
amitpagarwalCommented:
what version of sybase are you using .. if you are using 12 and above, u may use the concept of dynamic sql
0
 
hmkAuthor Commented:
11.9.2
0
 
amitpagarwalCommented:
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
 
hmkAuthor Commented:
11.9.2
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now