473,385 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

views from different database

5
just want to ask, is it possible to create views in which i will join tables from two different database? how?
Sep 11 '07 #1
3 2805
ck9663
2,878 Expert 2GB
just want to ask is it possible to create views i which i will join tables from two different database? how?

yes.

create your query first. then create it as view. if you need to change any part of the query (table, where condition) based on some parameter, a function returning a table would be better.
Sep 11 '07 #2
mayo
5
yes.

create your query first. then create it as view. if you need to change any part of the query (table, where condition) based on some parameter, a function returning a table would be better.
i mean combining data from multiple database? whats the syntax?
Sep 11 '07 #3
ck9663
2,878 Expert 2GB
i mean combining data from multiple database? whats the syntax?

yes...name your table properly....dbname.ownername.tablename

Expand|Select|Wrap|Line Numbers
  1. create view myview
  2. as
  3.  
  4. select table1.field1, table2.field2 
  5. from db1.dbo.tablel1
  6. inner join db2.dbo.table2 on table1.key = table2.key
  7.  
  8. go
i did not the syntax on this command...but i hope you got the ideae
Sep 11 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Marko Poutiainen | last post by:
Situation: We had to make our SQLServer 2000 database multi-lingual. That is, certain things (such as product names) in the database should be shown in the language the user is using (Finnish,...
3
by: jimstallings | last post by:
Hi, I am trying to locate documentation on using views across databases. We have serveral databases broken down by application, some shared databases and some location specific databases...
3
by: Damon | last post by:
I've searched for information on this but so far have not been able to find any advice. We have several databases running on SQL Server 7.0 that are essentially identical in structure but are...
8
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is...
2
by: Dave Stone | last post by:
I've just installed SP3A on MSDE 2000 since when any projects I open have a database window which (under 'Objects') lists Database Diagrams, but not Views or Stored Procedures. Has anyone else seen...
2
by: dbuchanan52 | last post by:
Hello, I am building an application for Windows Forms using. I am new to SQL Server 'Views'. Are the following correct understanding of their use? 1.) I believe a view can be referenced in a...
28
by: mooreit | last post by:
The purpose for my questions is accessing these technologies from applications. I develop both applications and databases. Working with Microsoft C#.NET and Microsoft SQL Server 2000 Production and...
15
by: rod.weir | last post by:
Fellow database developers, I would like to draw on your experience with views. I have a database that includes many views. Sometimes, views contains other views, and those views in turn may...
33
by: Peter | last post by:
People are telling me it is bad to put select * from <atable> in a view. I better should list all fields of the table inside the definition of the view. I dont know exactly why but some...
1
pbmods
by: pbmods | last post by:
Today I'd like to talk about a new feature introduced in MySQL 5: Views. Views are like snapshots of queries. You can save any query as a view, even complex queries with joins and subqueries,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.