Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create view from a different database 1

Status
Not open for further replies.

JeanPhil

Programmer
Dec 23, 2003
27
CA
Hi !

Is it possible to create a view in one database that is linked to another database.

I have a system with multiple companies which requires a database for each company. But I want to share a table for more than one database. Is there a way I can link a table from one database to another ?
 
Depends which database you are using.
You may also get user permissions problems and will need to think about recovery strategies.

e.g. for sql server just reference the remote database

dbname..tblname

You can use unions (see partitioned views) to access all databases from a single view.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Yeah thanks nigelrivett !!!

I use SQL Server with ASP code.

It was so obvious !!! Wow that help me A LOT !!!

Thanks again !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top