display a query from 2 diferent tables

Posted on 2014-04-23
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
Question by:edo60
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

Author Comment

ID: 40018619
i mean in a single order from a to z
LVL 11

Accepted Solution

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
SELECT distinct empresa FROM contactos
ORDER BY ColumnName

Open in new window


Author Closing Comment

ID: 40018855
oh man, so nice

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

762 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