|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Trying to use sysdatabases to query all DB's with a cursor
Hi All,
I am trying to query all databases with dbid > 4 with a cursor. I have created a stored procedure in master that uses a cursor to fetch the database name. All of the databases have the same tables but different info. I open the cursor, fetch the first db name and am doing select column_name from @fetched_dbname..table_name where blah, blah, blah. The query keeps failing at the from statement. I have tried a use statement but I can not use USE in a procedure. Any ideas? Thanks, Bryan Schmidt Last edited by absolut_bryan : May 26th, 2004 at 11:34 AM. |
|
#2
|
|||
|
|||
|
the solutions is here ..... somewhere
URL |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Trying to use sysdatabases to query all DB's with a cursor |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|