July 24, 2017 at 8:42 pm
Use OR/IN in the your WHERE clause.
SELECT itemno,item code,closedate
FROM item a INNER JOIN itemcode bFROM item a INNER JOIN itemcode b
ON a.itemno= b.itemnoON a.itemno= b.itemno
WHERE a.itemdesc IN *('approve', 'in progress', 'received');WHERE a.itemdesc IN *('approve', 'in progress', 'received');
July 25, 2017 at 7:59 am
I want something liekt his
SELECT itemno,item code,closedate as new_date(in progress),close_date for open_date(approve)
FROM item a INNER JOIN itemcode bFROM item a INNER JOIN itemcode b
ON a.itemno= b.itemnoON a.itemno= b.itemno
WHERE a.itemdesc IN *('approve', 'in progress', 'received');WHERE a.itemdesc IN *('approve', 'in progress', 'received');
July 25, 2017 at 11:51 pm
Why not make things easy for everyone and tell us all what your expected output is given the data you have already provided?
July 26, 2017 at 8:37 am
maybe something like:SELECT a.itemno, b.itemcode,
CASE a.itemdesc
WHEN 'aprove' THEN a.closedate
WHEN 'inprogress' THEN a.opendate
WHEN 'reject' THEN a.eventdate
END AS evemtdate
FROM item a
INNER JOIN itemcode b ON a.itemno = b.itemno
WHERE a.itemdesc IN ('aprove', 'inprogress', 'reject')
Viewing 4 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply