Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00905: missing keyword

787085Jul 23 2010 — edited Jul 23 2010
Hi im new to sql and i cant quite figure out this missing keyword error and was hoping you guys could just point it out real quick


select '<img src="'
||decode(mime_type,
'application/vnd.oasis.opendocument.text',
'#APP_IMAGES#icodt.GIF',
'application/vnd.ms-excel',
'#APP_IMAGES#ICXLS.GIF',
'application/msword',
'#APP_IMAGES#ICDOC.GIF',
'application/pdf',
'#APP_IMAGES#icpdf.GIF',
'application/vnd.ms-powerpoint',
'#APP_IMAGES#ICPPT.GIF',
'application/vnd.oasis.opendocument.spreadsheet',
'#APP_IMAGES#iccalc.GIF',
'application/vnd.oasis.opendocument.presentation',
'#APP_IMAGES#icodp.GIF',
'text/plain','#APP_IMAGES#ICTXT.GIF',
'application/x-zip-compressed',
'#APP_IMAGES#ICZIP.GIF',
'#APP_IMAGES#ICGEN.GIF')
||'" width="16" height="16" border="0" />
' "Type", ''||name||''
"Name",
to_char(updated_on,'MM/DD/YYYY HH:MI AM') as "Modified",
to_char(created_on,'MM/DD/YYYY HH:MI AM')as "Created",
updated_by as "Modified By",
checkedout_by as "Checked Out To",
attr1,
attr2,
attr3,
DUE_DATE,
RESPONSIBILITY,
RESPONSIBLE_STAFF,
JOB_ID,
AREA
from doclib_documents
where revision_of = 0
and deleted_as_of = to_date('04-22-2004','MM-DD-YYYY')
and :P60_AREA is null or AREA = :P60_AREA
and
:P60_MONTH is null or
Case :P60_MONTH
when 'Jan'
then DUE_DATE >= to_date('01-01-2011', 'MM-DD-YYYY') and DUE_DATE <= to_date('01-31-2010', 'MM-DD-YYYY')

when 'Feb'
then DUE_DATE >= to_date('02-01-2011', 'MM-DD-YYYY') and DUE_DATE <= to_date('02-31-2010', 'MM-DD-YYYY')

when 'Mar'
then DUE_DATE >= to_date('03-01-2011', 'MM-DD-YYYY') and DUE_DATE <= to_date('03-31-2010', 'MM-DD-YYYY')

when 'Apr'
then DUE_DATE >= to_date('04-01-2011', 'MM-DD-YYYY') and DUE_DATE <= to_date('04-31-2010', 'MM-DD-YYYY')

when 'May'
then DUE_DATE >= to_date('05-01-2011', 'MM-DD-YYYY') and DUE_DATE <= to_date('05-31-2010', 'MM-DD-YYYY')

when 'June'
then DUE_DATE >= to_date('06-01-2011', 'MM-DD-YYYY') and DUE_DATE <= to_date('06-31-2010', 'MM-DD-YYYY')

when 'July'
then DUE_DATE >= to_date('07-01-2011', 'MM-DD-YYYY') and DUE_DATE <= to_date('07-31-2010', 'MM-DD-YYYY')

when 'Aug'
then DUE_DATE >= to_date('08-01-2011', 'MM-DD-YYYY') and DUE_DATE <= to_date('08-31-2010', 'MM-DD-YYYY')

when 'Sept'
then DUE_DATE >= to_date('09-01-2011', 'MM-DD-YYYY') and DUE_DATE <= to_date('09-31-2010', 'MM-DD-YYYY')

when 'Oct'
then DUE_DATE >= to_date('10-01-2011', 'MM-DD-YYYY') and DUE_DATE <= to_date('10-31-2010', 'MM-DD-YYYY')

when 'Nov'
then DUE_DATE >= to_date('11-01-2011', 'MM-DD-YYYY') and DUE_DATE <= to_date('11-31-2010', 'MM-DD-YYYY')

when 'Dec'
then DUE_DATE >= to_date('12-01-2011', 'MM-DD-YYYY') and DUE_DATE <= to_date('12-31-2010', 'MM-DD-YYYY')

else DUE_DATE > to_date('01-01-2010', 'MM-DD-YYYY')

end

Edited by: user13297063 on 23-Jul-2010 6:29 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 20 2010
Added on Jul 23 2010
7 comments
1,155 views