Solved

display a query from 2 diferent tables

Posted on 2014-04-23
3
123 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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

895 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