Friday, February 24, 2012

accessing two database in sql server 2k5 express

hi guys. can you please provide tutorial/link how to access two database in one view. i was thinking about LINK TABLE like what i do in ms access but i find solution in sql server.

thnx.

I hope u need to get the result of two table from two database . You can create a view with three part qualified name.

Create view yourviewname

as

Select *from Databasename1.owner.tablename where ......

Union /Join

Select *from Databasename2.owner.tablename where ......

basically you need to give fully qualifed tablename . The user accessing this view should have permission in both the dbs

Madhu

|||thanks. its up and running...

No comments:

Post a Comment