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.
 
Back
Top