I second dorward's comment on point one.
However, there's a better way to do this. Rather than switching databases before running the query, you can query across databases on the same server without switching, assuming your security model allows, with syntax like the following:
select * from FFImages..information_schema.tables where table_catalog = 'FFImages' and table_type = 'Base Table'This is useful because it enables you to join tables from different databases on the same server, should you need to.
In reply to Re: Changing databases in MSSQL and fetching more than one row of results at a time
by terce
in thread Changing databases in MSSQL and fetching more than one row of results at a time
by Eagle_f90
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |