Results 1 to 13 of 13
  1. #1
    Join Date
    Mar 2006
    Posts
    53

    Unanswered: ORA-00904 puzzle

    It's been a while since I've worked with Oracle but I recently got a new job & am back at it again, trying to regain the knowledge I lost while not working with it.

    I'm getting an ORA-00904: : invalid identifier error message. Most of the documentation I've found on this seems to say that there should be a string between the colons identifying what is invalid-but there isn't. Is this significant? Maybe, if I knew which identifier it was, I could fix it, but as it is I've double-checked (even triple-checked) the query & don't see anything wrong. Any ideas, please?

    thx.
    Now back on Oracle. The more things change, the more they stay the same.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >I've double-checked (even triple-checked) the query & don't see anything wrong. Any ideas, please?
    I don't see anything wrong either.

    Most folks can NOT debug code they can not see; including me.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Mar 2006
    Posts
    53
    Actually my only question at this time is whether or not the fact that there's nothing between the colons is significant. The actual code is considered proprietary (dumb, I know, but that's management for you) so I can't post it. Assuming what I've shown about the error message contains no significant information then I will create a mockup of the code & post that. thanks.
    Now back on Oracle. The more things change, the more they stay the same.

  4. #4
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Only YOU know what language (SQL, PL/SQL, C++, VB, bash) that has you baffled & confused.

    Enjoy your mystery.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  5. #5
    Join Date
    Mar 2006
    Posts
    53
    You're right-I thought I'd mentioned that this was an Oracle Developer app, but on review now see that all I actually said was that it was an app. Sorry about that. This is coming from a query in an Oracle Report. The line the error points to is a Decode that calls a function to determine whether a passed date is historical or not and toggles the verb used in the report appropriately.

    Decode(checkdate(mydate),'HIST','was','is') verb
    Now back on Oracle. The more things change, the more they stay the same.

  6. #6
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    >Most of the documentation I've found on this seems to say that there should be a string between the colons
    >Actually my only question at this time is whether or not the fact that there's nothing between the colons is significant.

    After I find the missing colons, I might be able to provide you an answer; then again maybe not.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  7. #7
    Join Date
    Jun 2004
    Posts
    796
    Provided Answers: 1
    I love this kind of posting, it's like "20 Questions":

    Q1. Do you have an Oracle error?
    A1. Yes.
    Q2. Is there an error code?
    A2. Yes.
    Q3. Can we see the code causing the error?
    A3. No.

    and so on, until we reach Q20, when we realise that we haven't asked enough of the right questions to get enough information to help the poster, and we have to give up.
    90% of users' problems can be resolved by punching them - the other 10% by switching off their PCs.

  8. #8
    Join Date
    Mar 2006
    Posts
    53
    Although I certainly understand why you're curious about the code my inquiry was really about the error message-what does it mean rather than what's causing it. If I could understand what it means when the 'identifier' isn't shown in the error message then I could probably fix the code. Or maybe that should be 'possibly'.
    Now back on Oracle. The more things change, the more they stay the same.

  9. #9
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    Code:
    ORA-00904:	string: invalid identifier
    Cause:	The column name entered is either missing or invalid.
    Action:	Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in double quotation marks. It may not be a reserved word.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  10. #10
    Join Date
    Mar 2006
    Posts
    53
    As you see, there should be a string between the colons-and there isn't. What does that mean, that it can't figure out what identifier is invalid? I'm also assuming that there's no significance to the fact that my error says 'invalid identifier' rather than 'invalid column name'. Since the wording potentially changes with each version I've always figured the error number is more important for identifying the error.
    Now back on Oracle. The more things change, the more they stay the same.

  11. #11
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    an error of omission is still an error
    how do you print/display/report a missing identifier?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  12. #12
    Join Date
    Mar 2006
    Posts
    53
    Ahh, so the blank string indicates that, rather than one of the identifiers in the statement being invalid, there's an identifier that's required in the statement that's missing. That makes sense of the error message, now I need to go back over the statement to see if I can figure out what's missing. If I can't, then I'll be back & ask for help, posting the statement this time. Thanks.
    Now back on Oracle. The more things change, the more they stay the same.

  13. #13
    Join Date
    Mar 2006
    Posts
    53
    Now I'm frustrated because they've pulled me off this problem before it's solved. Pretty sure it's a rights issue, probably that the user is unable to see the function, but only this user & supervisor use this and the supervisor (with greater rights) isn't encountering the problem-but the user just retired so management says not to bother unless it crops up with the replacement user, whenever (s)he's hired. So I guess that, reluctantly, I'll call this solved. Thanks for the help, everyone.
    Now back on Oracle. The more things change, the more they stay the same.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •