Getting error message ORA-01008: not all variables bound.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Diane LaBrie
    New Member
    • Jan 2011
    • 3

    #1

    Getting error message ORA-01008: not all variables bound.

    I am new to writing SQL code not sure why I am getting this error ORA-01008: not all variables bound. If someone can look at my SQL code below and let me know what part of the code is incorrect I would really appreciate it.


    SELECT O142261.HOLD, O142261.HOLD_AM OUNT, O142261.HOLD_DE SC, O142261.HOLD_EX PLANATION, O142261.HOLD_FR OM_DATE, O142261.HOLD_OR IGINATING_OFFIC E_DESC, O142261.HOLD_TO _DATE, O219017.SPRIDEN _ID, O219017.SPRIDEN _LAST_NAME, O219017.SPRIDEN _FIRST_NAME, SYSDATE

    FROM BANINST1.AS_HOL D O142261, SATURN.SPRIDEN O219017

    WHERE ( ( O219017.SPRIDEN _PIDM = O142261.PERSON_ UID ) ) AND ( O219017.SPRIDEN _CHANGE_IND IS NULL ) AND ( O219017.SPRIDEN _ENTITY_IND = 'P' ) AND ( O142261.HOLD = :"Type of Hold" ) AND ( O142261.HOLD_TO _DATE > :"Hold to Date" )

    ORDER BY O219017.SPRIDEN _LAST_NAME ASC, O219017.SPRIDEN _FIRST_NAME ASC
    ;
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    What does those ":" mean? If that means not equal, use != or <> instead.

    Good Luck!!!

    ~~ CK

    Comment

    • gpl
      New Member
      • Jul 2007
      • 152

      #3
      From googling, this line is your problem
      ( O142261.HOLD = :"Type of Hold" ) AND ( O142261.HOLD_TO _DATE > :"Hold to Date" )

      prefixing a variable with : is a 'substitution variable', which needs defining.

      If you post in the Oracle forum, you are likely to get more help

      Comment

      • Diane LaBrie
        New Member
        • Jan 2011
        • 3

        #4
        Yes, it means not equal. I will try the code you recommended.

        Thanks,

        Diane

        Comment

        • Diane LaBrie
          New Member
          • Jan 2011
          • 3

          #5
          Thanks for your help. If the code does not work I will post in the Oracle forum. Appreciate your help.

          Comment

          Working...