GeeCON Prague 2014*
The moose likes JDBC and the fly likes java.sql.SQLException: ORA-01008: not all variables bound Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Bookmark "java.sql.SQLException: ORA-01008: not all variables bound" Watch "java.sql.SQLException: ORA-01008: not all variables bound" New topic
Author

java.sql.SQLException: ORA-01008: not all variables bound

jegan nathan
Greenhorn

Joined: Jun 25, 2008
Posts: 1
I get error as ORA-01008: not all variables bound.

Please anyone help me to solve this error.....

Thanks in Advance..


SELECT DISTINCT PG.PERSONALIZE_DOC_ID As Doc_Id,
'N' as Show_Flag,
JDR_MDS_INTERNAL.getDocumentName(PG.PERSONALIZE_DOC_ID) AS Docname,
DECODE(PT.ATT_VALUE, NULL, WT.ATT_VALUE, PT.ATT_VALUE) AS Functionname,
MIN(PG.PERSONALIZE_CREATED_ON),
(SELECT PERSONALIZE_CREATED_BY FROM c3aj_PERSONALIZATION WHERE PERSONALIZE_ID=(SELECT MIN(PERSONALIZE_ID) FROM c3aj_PERSONALIZATION WHERE PERSONALIZE_DOC_ID=PG.PERSONALIZE_DOC_ID)) AS CREATEDBY,
MAX(PG.PERSONALIZE_LAST_UPDATED_ON) ,
(SELECT PERSONALIZE_CREATED_BY FROM c3aj_PERSONALIZATION WHERE PERSONALIZE_ID=(SELECT MAX(PERSONALIZE_ID) FROM c3aj_PERSONALIZATION WHERE PERSONALIZE_DOC_ID=PG.PERSONALIZE_DOC_ID)) AS UPDATEDBY,
:1 AS SRCH_FROM_DATE,
:2 AS SRCH_TO_DATE,
:3 AS SRCH_SRC_LEVEL,
:4 AS SRCH_LEVEL_VALUE,
:5 AS SRCH_CREATED_BY,
:6 AS SRCH_PERZ_TYPE
FROM c3aj_PERSONALIZATION PG,
c3aj_PERSONALIZATION_SOURCE SRC,
JDR_ATTRIBUTES PT,
JDR_ATTRIBUTES WT
WHERE PT.ATT_NAME(+)='title'
AND PT.ATT_COMP_SEQ(+)=1
AND PT.ATT_COMP_DOCID(+)=PG.PERSONALIZE_DOC_ID
AND WT.ATT_NAME(+)='windowTitle'
AND WT.ATT_COMP_SEQ(+)=1
AND WT.ATT_COMP_DOCID(+)=PG.PERSONALIZE_DOC_ID
AND ((:1 IS NULL AND :2 is NULL)
OR (TO_DATE(TRUNC(PG.PERSONALIZE_CREATED_ON))
BETWEEN :1 AND :2))
AND (UPPER(PG.PERSONALIZE_CREATED_BY)
LIKE DECODE(:5, NULL, '%', :5))
AND SRC.PERSONALIZE_ID = PG.PERSONALIZE_ID
AND (:3 IS NULL OR SRC.SRC_LEVEL = :3)
AND (:4 IS NULL OR SRC.SRC_LEVEL_VALUE = :4)
AND (:6 IS NULL OR PG.PERSONALIZE_TYPE = :6)
AND (:7 IS NULL OR PG.PERSONALIZE_DOC_ID = :7)
GROUP BY PG.PERSONALIZE_DOC_ID, PT.ATT_VALUE, WT.ATT_VALUE
ORDER BY 3
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Okay, that's a query with several variables. The runtime error says you didn't bind values to all of them. So could you show us your code which binds variables to the query?
 
GeeCON Prague 2014
 
subject: java.sql.SQLException: ORA-01008: not all variables bound