Solved

display a query from 2 diferent tables

Posted on 2014-04-23
3
121 Views
Last Modified: 2014-04-23
hi all
how do i acomplish
select distinct proveedor from proveedor
select distinct empresa from contactos
in a single query order by proveedor,contactos
is that posible
tsm
edo
0
Comment
Question by:edo60
  • 2
3 Comments
 

Author Comment

by:edo60
ID: 40018619
i mean in a single order from a to z
tsm
0
 
LVL 11

Accepted Solution

by:
Simone B earned 500 total points
ID: 40018745
If I'm reading your question correctly, I think this might be what you're looking for. Use whatever you like for "ColumnName."

SELECT distinct proveedor AS ColumnName FROM proveedor
UNION ALL 
SELECT distinct empresa FROM contactos
ORDER BY ColumnName

Open in new window

0
 

Author Closing Comment

by:edo60
ID: 40018855
oh man, so nice
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

757 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now