Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SELECT with IF THEN ELSE
Never Mind Again. Firgured it out - like this:
SELECT SELECT_FROM_PART, SUM(QTY_DUE), CASE SUBSTR(REQUEST_ID,1,1) WHEN
'I' THEN 'Internal' ELSE SUBSTR (REQUEST_ID,3,4) END, NEED_DATE,
REQUEST_ID
FROM REQ1
WHERE STATUS IN ('O','H')
AND (SELECT_FROM_SC LIKE '1ASL%' OR SELECT_FROM_SC = 'LASR')
GROUP BY SELECT_FROM_PART, SUBSTR (REQUEST_ID,3,4), NEED_DATE,
REQUEST_ID
ORDER BY SELECT_FROM_PART
Merci Michel Cadot, Merci.
Received on Mon Dec 20 2004 - 12:23:15 CST