Solved

SQL query from multiple tables.

Posted on 2008-06-16
2
759 Views
Last Modified: 2010-08-05
Greetings,
I have two views with identical data fields.  I want to select all the data from each and list them sequentially.  For example view1 has data field Order# with values 1,3,5,7.  View2 has Order# with values 2,4,6,8.  Is it possible to have a single select statement that produces a result set as Order# 1,2,3,4,5,6,7,8?  
0
Comment
Question by:mdunlap99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 60

Accepted Solution

by:
chapmandew earned 125 total points
ID: 21795679
select * from view1 v1
union all
select * from view2 v2
order by v1.fieldname asc
0
 
LVL 8

Expert Comment

by:i2mental
ID: 21795702
select field1 from table1
union all
select field1 from table 2
order by field1
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Directory filled up and sql reloading agent settings 10 19
SQL DATE Past due to current wek 4 19
invoke-sqlcmd help 5 23
T-SQL Query 9 28
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question