Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 778
  • Last Modified:

SQL query from multiple tables.

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
mdunlap99
Asked:
mdunlap99
1 Solution
 
chapmandewCommented:
select * from view1 v1
union all
select * from view2 v2
order by v1.fieldname asc
0
 
i2mentalCommented:
select field1 from table1
union all
select field1 from table 2
order by field1
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now