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.
hmkAsked:
Who is Participating?
 
amitpagarwalConnect With a Mentor Commented:
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
 
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
 
hmkAuthor Commented:
11.9.2
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.