Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to set <database>..<table> dynamically in Store Procedure

2 views
Skip to first unread message

Vincenzo De Lisi

unread,
Jun 7, 2000, 3:00:00 AM6/7/00
to
Hi,
i need to use <Database>..<table> dynamically, in particular i have to cycle
in a store procedure the same query on different databases .
Is there a way to set dynamically database and/or table ? Or just one of
these.

Thanks

Vincenzo

Rob Verschoor

unread,
Jun 7, 2000, 3:00:00 AM6/7/00
to
Vincenzo,

Last year, I have written a number of very useful stored procedures
which do exactly what you describe. I recommend you check out
http://www.euronet.nl/~syp_rob/new_ssp.html. This contains (i) a
magazine article explaining how to do the basic trick and (ii)
downloadable stored procedures which are ready for use. Among these,
there is a procedure called "sp_rv_exec" which lets you run a stored
procedure in all database in the server in just a single command --
may this provides what you need.

HTH,

Rob
--
----------------------------------------------------------------------
Rob Verschoor

Certified Sybase Associate DBA for ASE 12.0
Certified Sybase Professional DBA/SQL Developer for ASE 11.5
Certified DBA/Performance & Tuning Specialist for Sybase System 11

email mailto:r...@sypron.nl
WWW http://www.euronet.nl/~syp_rob
snail Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
----------------------------------------------------------------------

"Vincenzo De Lisi" <vde...@tiscalinet.it> wrote in message
news:mh0egmH0$GA....@forums.sybase.com...

0 new messages