Query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,

I have a table: DESCRIPTION INVOICE1 PRICE1 INVOICE2 PRICE2
TIRES L56 $10
L57 $20
I want to build a query that would give me following:
DESCRIPTION INVOICE PRICE
TIRES L56 $10
TIRES L57 $20
Your help will be highly appreciated.
Thanks in advance.
Alish
 
Hi alish,

The best way to reconstruct your table to look like this:

DESCRIPTION INVOICE PRICE
TIRES L56 $10
TIRES L57 $20

But, if you can. Then I guess you have to do a UNION like this.

select description, invoice1 as INVOICE, pirce1 as PRICE from TABLE_NAME
UNION
select description, invoice2 as INVOICE, pirce2 as PRICE from TABLE_NAME
order by decription, INVOICE

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top