MySQL - Interchange column value from one row onto another

38 views Asked by At
SELECT OlineDate, OlineOrder, OlineDesc, OlineGroup, OlinePrice
FROM tblorderlines
WHERE DATE(OlineDate) = '2019-10-19' AND OlineOrder = 170
AND OlineGroup IN ('spec')

|====================================================================|
| OlineOrder |OlineDate   | OlineDesc | OlineGroup     | OlinePrice  |
|============+============+===========+================+=============|
| 10         | 2019-10-19 | Coupon    |    spec        |   -2.42     |
|------------+------------+-----------+----------------|-------------|
| 10         | 2019-10-19 | 10% OFF   |    spec        |    0.00     |
|------------+------------------------+----------------+-------------|

I am looking for a query that would interchange the '10% off' value over the 'Coupon' value. The only results I've found that may produce the result I want are pivot tables but those don't exist in MySQL. Is there another route I can take?

0

There are 0 answers