Would using a function to return DECODE(TD.description, NULL, SC.DESCRIPTION, 
TD.DESCRIPTION)  achieve what you are after?  (assuming you can do that in 8.1.7, I am 
not sure)

-----Original Message-----
Sent: Thursday, January 08, 2004 11:59 AM
To: Multiple recipients of list ORACLE-L

Hey all,

So, there I am on 8.1.7.4.0 creating some SQL suitable for a view:

SELECT
TS.username,
TS.reportdate,
TS.hours AS hours,
DECODE(TD.description, NULL, SC.DESCRIPTION, TD.DESCRIPTION) AS
TASK_DESCRIPTION,
TEAM.teamtype AS TeamType,
TS.productline,
ST.SUBTASKID "DEFECTID",
ST.DESCRIPTION "DEFECT_DESCRIPTION"
FROM
T1 TS,
T2 ST,
T3 TD,
TEAM ,
T5 SC
WHERE
TS.TASKID = TD.TASKID (+) AND
TS.TEAMID = TEAM.TEAMID AND
TS.WORKORDERNO = SC.WORKORDERNO (+)
AND TS.operation = SC.OPERATIONNO (+)
AND TS.TASKID = ST.TASKID (+);

Works great, except when the view is created from this SQL because according
to Metalink article 1030221.6, the DECODE function is preventing the view
from being merged, causing an FTS on the T5 (SC) table.  Of course, this
table is


**************************************************************************************
This e-mail message is confidential, intended only for the named recipient(s) above 
and may contain information that is privileged, attorney work product or exempt from 
disclosure under applicable law. If you have received this message in error, or are 
not the named recipient(s), please immediately notify corporate MIS at (860) 766-2000 
and delete this e-mail message from your computer, Thank you.
**************************************************************************************4
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Boyle, Christopher J.
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to