0

I have a third party Sql Server data, which I need to use as a data source for my custom database, without duplicating data. One thing, which comes to mind is to create a View in my custom database, which would reference one or more tables from this third party database. Is this possible with Sql Server 2014?

Eugene Goldberg
  • 14,286
  • 20
  • 94
  • 167

2 Answers2

2

Yes, as long as they're on the same server, TSQL: Create a view that accesses multiple databases . If they're on different servers, then you'd have to create a linked server, which I wouldn't suggest unless you're aware of the pitfalls.

Community
  • 1
  • 1
Bruce Dunwiddie
  • 2,888
  • 1
  • 15
  • 20
1

Yes very much it is possible but you need to fully qualify the table name like

create view testview
as
select * from db_name.schema_name.table_name
Rahul
  • 76,197
  • 13
  • 71
  • 125